net.noco.dtogen.write
Class ToolCodeWriter

java.lang.Object
  extended bynet.noco.dtogen.write.ToolCodeWriter

public class ToolCodeWriter
extends java.lang.Object

This utility class is responsible for creating pieces of code for different types of methods.

Version:
$Revision: 1.59 $
Author:
the_mindstorm(at)evolva(dot)ro

Field Summary
private  java.util.Map allSkeletons
           
private static java.util.Map COLLECTIONS
           
private static ILog L
           
private  ModelRepository repository
           
 
Constructor Summary
ToolCodeWriter(ModelRepository repo, java.util.Map allSkels)
           
 
Method Summary
private  java.lang.String getDimension(int size)
           
private  void writeDirectArraySetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi, java.lang.String paramName, int arrayIndex)
           
private  void writeDirectCollectionSetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi, java.lang.String paramName, int collIndex)
          BUGFIX #6
 Code writeDirectMapCode(DTOClassSkel skel, java.util.Map paramMapping)
           
 Code writeDirectMapCode(DTOClassSkel skel, java.lang.String originatorFqn)
           
private  void writeDirectSimpleSetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi, java.lang.String paramName)
          creates the Code for a simple setter.
private  void writeInverseArraySetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi, int arrayIdx)
           
private  void writeInverseCollectionSetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi, int colIndex)
           
 Code writeInverseMapCode(DTOClassSkel skel, java.lang.String originatorFqn)
           
private  void writeInverseSimpleSetter(Code code, BeanPropertySkel bp, BeanPropertyInfo bpi)
          creates the code that sets a simple property on the original POJO.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

private static final ILog L

COLLECTIONS

private static final java.util.Map COLLECTIONS

repository

private ModelRepository repository

allSkeletons

private java.util.Map allSkeletons
Constructor Detail

ToolCodeWriter

public ToolCodeWriter(ModelRepository repo,
                      java.util.Map allSkels)
Method Detail

writeDirectMapCode

public Code writeDirectMapCode(DTOClassSkel skel,
                               java.util.Map paramMapping)

writeDirectMapCode

public Code writeDirectMapCode(DTOClassSkel skel,
                               java.lang.String originatorFqn)

writeInverseMapCode

public Code writeInverseMapCode(DTOClassSkel skel,
                                java.lang.String originatorFqn)

writeInverseSimpleSetter

private void writeInverseSimpleSetter(Code code,
                                      BeanPropertySkel bp,
                                      BeanPropertyInfo bpi)
creates the code that sets a simple property on the original POJO.


writeInverseCollectionSetter

private void writeInverseCollectionSetter(Code code,
                                          BeanPropertySkel bp,
                                          BeanPropertyInfo bpi,
                                          int colIndex)
Parameters:
colIndex - BUGFIX #6

writeInverseArraySetter

private void writeInverseArraySetter(Code code,
                                     BeanPropertySkel bp,
                                     BeanPropertyInfo bpi,
                                     int arrayIdx)
Parameters:
arrayIdx - BUGFIX #6

writeDirectSimpleSetter

private void writeDirectSimpleSetter(Code code,
                                     BeanPropertySkel bp,
                                     BeanPropertyInfo bpi,
                                     java.lang.String paramName)
creates the Code for a simple setter. It solve the POJO to DTO mappings.


writeDirectCollectionSetter

private void writeDirectCollectionSetter(Code code,
                                         BeanPropertySkel bp,
                                         BeanPropertyInfo bpi,
                                         java.lang.String paramName,
                                         int collIndex)
BUGFIX #6


writeDirectArraySetter

private void writeDirectArraySetter(Code code,
                                    BeanPropertySkel bp,
                                    BeanPropertyInfo bpi,
                                    java.lang.String paramName,
                                    int arrayIndex)
Parameters:
arrayIndex - BUGFIX #6

getDimension

private java.lang.String getDimension(int size)


Copyright © 2004 Alexandru Popescu (a.k.a. the_mindstorm). All Rights Reserved.