|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.org.usurper.setup.UsurperGeneratorSetup
public class UsurperGeneratorSetup
This is the mutable version of the class setting up the behaviour of the UsurperGenerator. Default behaviour is to fail if no handler is registered for a given property of the Bean.
Default type handlers are already registered (but can be overriden) for :
| Constructor Summary | |
|---|---|
UsurperGeneratorSetup()
Instantiates a new mutable usurper generator setup using default configuration: Using default property handlers for basic types (see default handlers' package), SQL types handlers ,and Collections handlers. |
|
UsurperGeneratorSetup(IUsurperGeneratorSetup immutableSetup)
Instantiates a new mutable usurper generator setup using the passed setup as a configuration. |
|
| Method Summary | |
|---|---|
java.util.Map<ITargetDefinition,IHandler> |
getAllHandlers()
Gets all handlers. |
ArrayHandler |
getArrayHandler()
Gets the array handler. |
ICountCallback |
getCountCallback()
Gets the count callback. |
EnumHandler |
getEnumHandler()
Gets the enum handler. |
ImmutableUsurperGeneratorSetup |
getImmutable()
Gets the immutable version of this mutable setup. |
OnMissingHandlers |
getOnMissingHandlers()
Gets the on missing handlers behavior. |
AbstractPropertyTypeHandler |
getPropertyTypeHandler(PropertyTypeDefinition handledType)
This method retrieves the Handler for Properties of a given java type. |
java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> |
getPropertyTypeHandlersMap()
Gets the property type handlers map. |
PropertyWritingMechanism |
getPropertyWritingMechanism()
Gets the property writing mechanism behavior. |
AbstractSpecificPropertyHandler |
getSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
This method retrieves the Handler for a given Property of a given Class. |
java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> |
getSpecificPropertyHandlersMap()
Gets the specific property handlers map. |
boolean |
hasPropertyTypeHandler(PropertyTypeDefinition type)
This method tests if a handler is registered for a given Java Type. |
boolean |
hasSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
This method tests if a handler is registered for a given Property of a given Class. |
void |
onMissingHandlers(OnMissingHandlers onMissingHandlers)
Sets On missing handlers behavior using the enum type. |
void |
registerPropertyTypeHandler(AbstractPropertyTypeHandler typeHandler)
This method allows the user to register a Handler for Properties of determinated java types. |
void |
registerPropertyTypeHandlers(java.util.Set<AbstractPropertyTypeHandler> typeHandlers)
This method allows the user to register many Handlers for Properties of determinated java types. |
void |
registerSpecificPropertyHandler(AbstractSpecificPropertyHandler propertyHandler)
This method allows the user to register a Handler for a given property. |
void |
setAllHandlers(java.util.Map<ITargetDefinition,IHandler> handlers)
Sets All the handlers at once. |
void |
setArrayHandler(ArrayHandler arrayHandler)
Sets the array handler. |
void |
setCountCallback(ICountCallback countCallback)
Sets the count callback. |
void |
setEnumHandler(EnumHandler enumHandler)
Sets the enum handler. |
void |
setOnMissingHandlers(java.lang.String onMissingHandlers)
Sets On missing handlers behavior using the String values of the enum type. |
void |
setPropertyTypeHandlersMap(java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> propertyTypeHandlersMap)
Sets the property type handlers map. |
void |
setPropertyWritingMechanism(java.lang.String propertyWritingMechanism)
Sets the property writing mechanism using the String values of the enum type. |
java.lang.String |
toString()
|
java.lang.String |
toStringRepresentation()
The implementation of this method must return a String representation of the setup. |
void |
usePropertyWritingMechanism(PropertyWritingMechanism propertyWritingMechanism)
Sets the property writing mechanism using the enum type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UsurperGeneratorSetup()
UsurperGeneratorConstants.
public UsurperGeneratorSetup(IUsurperGeneratorSetup immutableSetup)
immutableSetup - the immutable setup| Method Detail |
|---|
public java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> getPropertyTypeHandlersMap()
IUsurperGeneratorSetup
getPropertyTypeHandlersMap in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getPropertyTypeHandlersMap()public void setPropertyTypeHandlersMap(java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> propertyTypeHandlersMap)
propertyTypeHandlersMap - the property type handlers mappublic java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> getSpecificPropertyHandlersMap()
IUsurperGeneratorSetup
getSpecificPropertyHandlersMap in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getSpecificPropertyHandlersMap()public void registerPropertyTypeHandler(AbstractPropertyTypeHandler typeHandler)
typeHandler - the handler to register (AbstractPropertyTypeHandler)public void registerPropertyTypeHandlers(java.util.Set<AbstractPropertyTypeHandler> typeHandlers)
typeHandlers - the handler to register (Set<AbstractPropertyTypeHandler>)public boolean hasPropertyTypeHandler(PropertyTypeDefinition type)
IUsurperGeneratorSetup
hasPropertyTypeHandler in interface IUsurperGeneratorSetuptype - the property type definition
IUsurperGeneratorSetup.hasPropertyTypeHandler(org.org.usurper.model.PropertyTypeDefinition)public AbstractPropertyTypeHandler getPropertyTypeHandler(PropertyTypeDefinition handledType)
IUsurperGeneratorSetup
getPropertyTypeHandler in interface IUsurperGeneratorSetuphandledType - the property type definition
IUsurperGeneratorSetup.getPropertyTypeHandler(org.org.usurper.model.PropertyTypeDefinition)public void registerSpecificPropertyHandler(AbstractSpecificPropertyHandler propertyHandler)
propertyHandler - the handler to register (AbstractSpecificPropertyHandler)public java.util.Map<ITargetDefinition,IHandler> getAllHandlers()
IUsurperGeneratorSetup
getAllHandlers in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getAllHandlers()public ImmutableUsurperGeneratorSetup getImmutable()
public ArrayHandler getArrayHandler()
IUsurperGeneratorSetup
getArrayHandler in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getArrayHandler()public void setArrayHandler(ArrayHandler arrayHandler)
arrayHandler - the new array handlerpublic EnumHandler getEnumHandler()
IUsurperGeneratorSetup
getEnumHandler in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getEnumHandler()public void setEnumHandler(EnumHandler enumHandler)
enumHandler - the new enum handlerpublic OnMissingHandlers getOnMissingHandlers()
IUsurperGeneratorSetup
getOnMissingHandlers in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getOnMissingHandlers()public void setOnMissingHandlers(java.lang.String onMissingHandlers)
onMissingHandlers - the new on missing handlerspublic void onMissingHandlers(OnMissingHandlers onMissingHandlers)
onMissingHandlers - the on missing handlerspublic PropertyWritingMechanism getPropertyWritingMechanism()
IUsurperGeneratorSetup
getPropertyWritingMechanism in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getPropertyWritingMechanism()public void setPropertyWritingMechanism(java.lang.String propertyWritingMechanism)
propertyWritingMechanism - the new property writing mechanismpublic void usePropertyWritingMechanism(PropertyWritingMechanism propertyWritingMechanism)
propertyWritingMechanism - the property writing mechanismpublic ICountCallback getCountCallback()
IUsurperGeneratorSetup
getCountCallback in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.getCountCallback()public void setCountCallback(ICountCallback countCallback)
countCallback - the new count callbackpublic boolean hasSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
IUsurperGeneratorSetup
hasSpecificPropertyHandler in interface IUsurperGeneratorSetupspecificPropertyDefinition - the specific property definition
IUsurperGeneratorSetup.hasSpecificPropertyHandler(org.org.usurper.model.SpecificPropertyDefinition)public AbstractSpecificPropertyHandler getSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
IUsurperGeneratorSetup
getSpecificPropertyHandler in interface IUsurperGeneratorSetupspecificPropertyDefinition - the specific property definition
IUsurperGeneratorSetup.getSpecificPropertyHandler(org.org.usurper.model.SpecificPropertyDefinition)public void setAllHandlers(java.util.Map<ITargetDefinition,IHandler> handlers)
handlers - the handlerspublic java.lang.String toStringRepresentation()
IUsurperGeneratorSetup
toStringRepresentation in interface IUsurperGeneratorSetupIUsurperGeneratorSetup.toStringRepresentation()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||