org.nuiton.wikitty.generator
Class WikittyTransformerUtil

java.lang.Object
  extended by org.nuiton.wikitty.generator.WikittyTransformerUtil

public class WikittyTransformerUtil
extends Object


Field Summary
protected static String BUSINESS_ENTITY_CLASS_FQN
           
protected static String BUSINESS_ENTITY_STEREOTYPE_NAME
          user will use this stereotype in his model
protected static String BUSINESS_ENTITY_STEREOTYPE_OLD_NAME
          Deprecated. name change : see ticket #798. use BUSINESS_ENTITY_STEREOTYPE_NAME
protected static String BUSINESS_ENTITY_WIKITTY_CLASS_FQN
           
protected static String ENTITY_PACKAGE
           
protected static String META_EXTENSION_STEREOTYPE_NAME
          user will use this stereotype to make an extension a meta-extension
protected static String TAG_ALTERNATIVE_NAME
           
protected static String TAG_DOCUMENTATION
           
protected static String TAG_TO_STRING
           
protected static String TAG_VERSION
           
protected static String WIKITTY_CLASS_FQN
           
protected static String WIKITTY_EXTENSION_CLASS_FQN
           
 
Method Summary
protected static String attributeToFielVariableName(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, boolean withClassNamePrefix)
          given the field name of the class Client, will return "FIELD_CLIENT_NAME"
static String businessEntityToAbstractName(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
static String businessEntityToContractName(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
static String businessEntityToHelperName(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
static String businessEntityToImplementationName(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
protected static String classToExtensionVariableName(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean withClassNamePrefix)
          given a class called Client will return "EXT_CLIENT" should be used as a variable name to store the extension name
protected static String FQNtoSimpleName(String fqn)
          given "my.java.package.MyClass" or "MyClass" return "MyClass"
protected static String generateGetFieldAsCall(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
          wikitty interface provide getFieldAsString, getFieldAsDate etc. methods this method returns the good name of the method to call depending the type given as parameter
protected static String generateResultType(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, boolean considerMultiplicity)
          for a given type of attribute, the getter returned type must be...
protected static String getCollectionTypeName(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
           
static boolean isAttributeCollection(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
           
protected static boolean isBusinessEntity(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
static boolean isMetaExtension(org.nuiton.eugene.models.object.ObjectModelClass clazz)
           
protected static String typeToWikittyColumn(String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY_PACKAGE

protected static final String ENTITY_PACKAGE
See Also:
Constant Field Values

BUSINESS_ENTITY_CLASS_FQN

protected static final String BUSINESS_ENTITY_CLASS_FQN
See Also:
Constant Field Values

BUSINESS_ENTITY_WIKITTY_CLASS_FQN

protected static final String BUSINESS_ENTITY_WIKITTY_CLASS_FQN
See Also:
Constant Field Values

WIKITTY_CLASS_FQN

protected static final String WIKITTY_CLASS_FQN
See Also:
Constant Field Values

WIKITTY_EXTENSION_CLASS_FQN

protected static final String WIKITTY_EXTENSION_CLASS_FQN
See Also:
Constant Field Values

TAG_VERSION

protected static final String TAG_VERSION
See Also:
Constant Field Values

TAG_ALTERNATIVE_NAME

protected static final String TAG_ALTERNATIVE_NAME
See Also:
Constant Field Values

TAG_TO_STRING

protected static final String TAG_TO_STRING
See Also:
Constant Field Values

TAG_DOCUMENTATION

protected static final String TAG_DOCUMENTATION
See Also:
Constant Field Values

BUSINESS_ENTITY_STEREOTYPE_OLD_NAME

@Deprecated
protected static final String BUSINESS_ENTITY_STEREOTYPE_OLD_NAME
Deprecated. name change : see ticket #798. use BUSINESS_ENTITY_STEREOTYPE_NAME
See Also:
Constant Field Values

BUSINESS_ENTITY_STEREOTYPE_NAME

protected static final String BUSINESS_ENTITY_STEREOTYPE_NAME
user will use this stereotype in his model

See Also:
Constant Field Values

META_EXTENSION_STEREOTYPE_NAME

protected static final String META_EXTENSION_STEREOTYPE_NAME
user will use this stereotype to make an extension a meta-extension

See Also:
Constant Field Values
Method Detail

classToExtensionVariableName

protected static String classToExtensionVariableName(org.nuiton.eugene.models.object.ObjectModelClass clazz,
                                                     boolean withClassNamePrefix)
given a class called Client will return "EXT_CLIENT" should be used as a variable name to store the extension name

Parameters:
clazz -
withClassNamePrefix - add class name as prefix (will return "Client.EXT_CLIENT")
Returns:

attributeToFielVariableName

protected static String attributeToFielVariableName(org.nuiton.eugene.models.object.ObjectModelAttribute attribute,
                                                    boolean withClassNamePrefix)
given the field name of the class Client, will return "FIELD_CLIENT_NAME"

Parameters:
attribute -
withClassNamePrefix - add class name as prefix (ie "Client.FIELD_CLIENT_NAME")
Returns:

FQNtoSimpleName

protected static String FQNtoSimpleName(String fqn)
given "my.java.package.MyClass" or "MyClass" return "MyClass"

Parameters:
fqn -
Returns:

isBusinessEntity

protected static boolean isBusinessEntity(org.nuiton.eugene.models.object.ObjectModelClass clazz)

isMetaExtension

public static boolean isMetaExtension(org.nuiton.eugene.models.object.ObjectModelClass clazz)

generateGetFieldAsCall

protected static String generateGetFieldAsCall(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
wikitty interface provide getFieldAsString, getFieldAsDate etc. methods this method returns the good name of the method to call depending the type given as parameter

Parameters:
attribute - a name of a business entity or "String", "Integer" etc.
Returns:
the name of a method "getFieldAsInt" for example

generateResultType

protected static String generateResultType(org.nuiton.eugene.models.object.ObjectModelAttribute attribute,
                                           boolean considerMultiplicity)
for a given type of attribute, the getter returned type must be...

Parameters:
attribute -
considerMultiplicity -
Returns:

getCollectionTypeName

protected static String getCollectionTypeName(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)

isAttributeCollection

public static boolean isAttributeCollection(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)

typeToWikittyColumn

protected static String typeToWikittyColumn(String type)

businessEntityToContractName

public static String businessEntityToContractName(org.nuiton.eugene.models.object.ObjectModelClass clazz)

businessEntityToAbstractName

public static String businessEntityToAbstractName(org.nuiton.eugene.models.object.ObjectModelClass clazz)

businessEntityToImplementationName

public static String businessEntityToImplementationName(org.nuiton.eugene.models.object.ObjectModelClass clazz)

businessEntityToHelperName

public static String businessEntityToHelperName(org.nuiton.eugene.models.object.ObjectModelClass clazz)


Copyright © 2009-2010 CodeLutin. All Rights Reserved.