net.noco.dtogen.write
Class ToolMethodWriter

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

public class ToolMethodWriter
extends java.lang.Object

This utility class is responsible with the generation of Tool mapping methods.

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

Field Summary
private  ToolCodeWriter codeWriter
           
private static java.lang.String[] CONVERT_MODIFIERS
           
private static ILog L
           
private  ModelRepository repo
           
 
Constructor Summary
ToolMethodWriter(ModelRepository repository, java.util.Map allSkeletons)
          Constructs a ToolMethodWriter which is aware of the current ModelRespository and all registered DTO skeletons.
 
Method Summary
 CodeJavaMethod writeCreateDTO(com.thoughtworks.qdox.model.JavaClass clazz, DTOClassSkel skel)
          creates the creational DTO method which takes all POJOs as parameter.
 CodeJavaMethod writeDirectCreate(com.thoughtworks.qdox.model.JavaClass clazz, DTOClassSkel skel, java.lang.String originatedFqn)
          creates the creational DTO method which uses only 1 POJO as parameter.
 CodeJavaMethod writeInverseCreate(com.thoughtworks.qdox.model.JavaClass clazz, DTOClassSkel skel, java.lang.String originatedFqn)
           
 CodeJavaMethod[] writeMappingMethods(com.thoughtworks.qdox.model.JavaClass clazz, DTOClassSkel skel)
          generates mapping methods.
 
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

CONVERT_MODIFIERS

private static final java.lang.String[] CONVERT_MODIFIERS

codeWriter

private ToolCodeWriter codeWriter

repo

private ModelRepository repo
Constructor Detail

ToolMethodWriter

public ToolMethodWriter(ModelRepository repository,
                        java.util.Map allSkeletons)
Constructs a ToolMethodWriter which is aware of the current ModelRespository and all registered DTO skeletons.

Parameters:
repository -
allSkeletons -
Method Detail

writeMappingMethods

public CodeJavaMethod[] writeMappingMethods(com.thoughtworks.qdox.model.JavaClass clazz,
                                            DTOClassSkel skel)
generates mapping methods. one for DTO creation from all originated POJOs, and an inverse one from DTO to originated POJO.


writeInverseCreate

public CodeJavaMethod writeInverseCreate(com.thoughtworks.qdox.model.JavaClass clazz,
                                         DTOClassSkel skel,
                                         java.lang.String originatedFqn)

writeDirectCreate

public CodeJavaMethod writeDirectCreate(com.thoughtworks.qdox.model.JavaClass clazz,
                                        DTOClassSkel skel,
                                        java.lang.String originatedFqn)
creates the creational DTO method which uses only 1 POJO as parameter.


writeCreateDTO

public CodeJavaMethod writeCreateDTO(com.thoughtworks.qdox.model.JavaClass clazz,
                                     DTOClassSkel skel)
creates the creational DTO method which takes all POJOs as parameter.



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