org.objectweb.speedo.generation.lib
Class NamingRules

java.lang.Object
  |
  +--org.objectweb.speedo.generation.lib.NamingRules

public abstract class NamingRules
extends java.lang.Object

Normalises names given to Proxy infrastructure's files created during generation.

Author:
Y. Devaux

Field Summary
static java.lang.String fields
          Suffix added to the class name to create the field manager class name.
static java.lang.String objectId
          Suffix added to the object idclass name
static java.lang.String proxy
          Suffix added to the class name to create the proxy class name.
 
Constructor Summary
NamingRules()
           
 
Method Summary
static java.lang.String accessorName(java.lang.String className)
          Gives the name for the object which implements the interface PAccessor.
static java.lang.String binderName(java.lang.String compositeNameName)
          Gives the name for the JORM class which manages mapping.
static java.lang.String bindingName(java.lang.String className)
          Gives the name for the JORM class which manages binding between memory instances and database instances.
static java.lang.String className(java.lang.String completeClassName)
          Gets the name of a class
static java.lang.String fieldsName(java.lang.String className)
          Gives the name of the persistent fields holder.
static java.lang.String fqBindingName(java.lang.String className, java.lang.String mapperName)
          Gives the name for the JORM class which manages binding between memory instances and database instances.
static java.lang.String fqMappingName(java.lang.String className, java.lang.String mapperName)
          Gives the name for the JORM class which manages mapping.
static java.lang.String generatedObjectIdName(java.lang.String className)
           
static java.lang.String getterName(SpeedoClass sc, java.lang.String fieldName)
          Gives the name of an accessor for a field (a get method).
static java.lang.String keyName(java.lang.String className)
          Gives the name for key objects.
static java.lang.String mappingName(java.lang.String className)
          Gives the name for the JORM class which manages mapping.
static java.lang.String packageName(java.lang.String completeClassName)
          Gets the package of a class
static java.lang.String pnameName(java.lang.String compositeNameName)
          Gives the name for the JORM class which manages mapping.
static java.lang.String pngName(java.lang.String compositeNameName)
          Gives the name for the JORM class which manages mapping.
static java.lang.String proxyName(java.lang.String className)
          Gives the proxy name.
static java.lang.String setterName(SpeedoClass sc, java.lang.String fieldName)
          Gives the name of a mutator for a field (a set method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proxy

public static final java.lang.String proxy
Suffix added to the class name to create the proxy class name.

fields

public static final java.lang.String fields
Suffix added to the class name to create the field manager class name.

objectId

public static final java.lang.String objectId
Suffix added to the object idclass name
Constructor Detail

NamingRules

public NamingRules()
Method Detail

proxyName

public static final java.lang.String proxyName(java.lang.String className)
Gives the proxy name.
Parameters:
className - class name.
Returns:
proxy name.

generatedObjectIdName

public static final java.lang.String generatedObjectIdName(java.lang.String className)

fieldsName

public static final java.lang.String fieldsName(java.lang.String className)
Gives the name of the persistent fields holder.
Parameters:
className - className.
Returns:
name for persistent fields holder.

bindingName

public static final java.lang.String bindingName(java.lang.String className)
Gives the name for the JORM class which manages binding between memory instances and database instances.
Parameters:
className - class name.
Returns:
binder name.

fqBindingName

public static final java.lang.String fqBindingName(java.lang.String className,
                                                   java.lang.String mapperName)
Gives the name for the JORM class which manages binding between memory instances and database instances.
Parameters:
className - class name.
Returns:
binder name.

mappingName

public static final java.lang.String mappingName(java.lang.String className)
Gives the name for the JORM class which manages mapping.
Parameters:
className - class name.
Returns:
mapping name.

binderName

public static final java.lang.String binderName(java.lang.String compositeNameName)
Gives the name for the JORM class which manages mapping.
Parameters:
compositeNameName - composite name.
Returns:
mapping name.

pnameName

public static final java.lang.String pnameName(java.lang.String compositeNameName)
Gives the name for the JORM class which manages mapping.
Parameters:
compositeNameName - composite name.
Returns:
mapping name.

pngName

public static final java.lang.String pngName(java.lang.String compositeNameName)
Gives the name for the JORM class which manages mapping.
Parameters:
compositeNameName - composite name.
Returns:
mapping name.

fqMappingName

public static final java.lang.String fqMappingName(java.lang.String className,
                                                   java.lang.String mapperName)
Gives the name for the JORM class which manages mapping.
Parameters:
className - class name.
Returns:
mapping name.

accessorName

public static final java.lang.String accessorName(java.lang.String className)
Gives the name for the object which implements the interface PAccessor.
Parameters:
className - class name.
Returns:
manager name.

keyName

public static final java.lang.String keyName(java.lang.String className)
Gives the name for key objects.
Parameters:
className - class name.
Returns:
key class name.

getterName

public static final java.lang.String getterName(SpeedoClass sc,
                                                java.lang.String fieldName)
Gives the name of an accessor for a field (a get method).
Parameters:
fieldName - field name
Returns:
the name of the accessor method.

setterName

public static final java.lang.String setterName(SpeedoClass sc,
                                                java.lang.String fieldName)
Gives the name of a mutator for a field (a set method).
Parameters:
fieldName - field name
Returns:
the name of the mutator method.

className

public static java.lang.String className(java.lang.String completeClassName)
Gets the name of a class
Parameters:
completeClassName - the complete name of the class including its package name
Returns:
the name of the class without its package

packageName

public static java.lang.String packageName(java.lang.String completeClassName)
Gets the package of a class
Parameters:
completeClassName - the complete name of the class including its package name
Returns:
the package of the class without its class name