|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--kodo.jdbc.meta.PropertiesReverseCustomizer
Simple ReverseCustomizer that uses a properties file to
to allow customization of basic class and field properties. The
customizer uses the following keys:
none to reject the class and leave the
corresponding table unmapped.datastore to use datastore identity for a particular class,
rather than the default application identity. Any value other than
datastore will be used to rename the gernated application
identity class. Give full class names. If the class has been
renamed, use the new name. The table for the class must have a single
numeric primary key column.none to reject the generated mapping.
| Field Summary | |
protected Properties |
props
|
protected ReverseMappingTool |
tool
|
| Constructor Summary | |
PropertiesReverseCustomizer()
|
|
| Method Summary | |
boolean |
customize(ClassMapping mapping)
Customize the given class information produced by the reverse mapping tool. |
boolean |
customize(FieldMapping mapping)
Customize the given field information produced by the reverse mapping tool. |
String |
getClassCode(ClassMapping mapping)
Return a code template for the given class, or null to use the standard system-generated Java code. |
String |
getDeclaration(FieldMapping field)
Return a code template for the declaration of the given field, or null to use the system-generated default Java code. |
String |
getFieldCode(FieldMapping field)
Return a code template for the get/set methods of the given field, or null to use the system-generated default Java code. |
String |
getInitialValue(FieldMapping field)
Return code for the initial value for the given field, or null to use the default generated by the system. |
boolean |
isSubclassTable(Table table)
Return true if the given table is for a class that is a subclass of another persistent type. |
void |
setConfiguration(Properties props)
Set configuration properties given by the user. |
void |
setTool(ReverseMappingTool tool)
Set the reverse mapping tool using this customizer. |
boolean |
unmappedTable(Table table)
Notification that a table has gone unmapped. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Properties props
protected ReverseMappingTool tool
| Constructor Detail |
public PropertiesReverseCustomizer()
| Method Detail |
public void setConfiguration(Properties props)
ReverseCustomizersetConfiguration in interface ReverseCustomizerpublic void setTool(ReverseMappingTool tool)
ReverseCustomizersetTool in interface ReverseCustomizerpublic boolean isSubclassTable(Table table)
ReverseCustomizerisSubclassTable in interface ReverseCustomizerpublic boolean customize(ClassMapping mapping)
ReverseCustomizerReverseMappingTool.generateClass(java.lang.String, java.lang.Class) to creat a new class object,
then setting it with DelegatingClassMetaData.setDescribedType(java.lang.Class)). The
mapping will not have any fields yet when this method is called.customize in interface ReverseCustomizerkodo.jdbc.meta.ReverseCustomizerpublic String getClassCode(ClassMapping mapping)
ReverseCustomizergetClassCode in interface ReverseCustomizerpublic boolean customize(FieldMapping mapping)
ReverseCustomizercustomize in interface ReverseCustomizerkodo.jdbc.meta.ReverseCustomizerpublic String getInitialValue(FieldMapping field)
ReverseCustomizergetInitialValue in interface ReverseCustomizerpublic String getDeclaration(FieldMapping field)
ReverseCustomizergetDeclaration in interface ReverseCustomizerpublic String getFieldCode(FieldMapping field)
ReverseCustomizergetFieldCode in interface ReverseCustomizerpublic boolean unmappedTable(Table table)
ReverseCustomizerReverseMappingTool.newClassMetaData(java.lang.Class, java.lang.Class, int) to create class metadata,
and ReverseMappingTool.newFieldMetaData(java.lang.String, java.lang.Class, kodo.meta.ClassMetaData) to create field
metadata. Once the metadata is created, you can wrap it in
ClassMapping and FieldMapping instances. Then, add
the mappings (class first) to the tool via
ReverseMappingTool.addClassMapping(kodo.jdbc.meta.ClassMapping) and
ReverseMappingTool.addFieldMapping(kodo.jdbc.meta.FieldMapping, kodo.jdbc.meta.ClassMapping). These add methods will
call your ReverseCustomizer.customize(kodo.jdbc.meta.ClassMapping) methods in turn.unmappedTable in interface ReverseCustomizerkodo.jdbc.meta.ReverseCustomizer
|
SolarMetric Kodo JDO 3.0.3 generated on February 20 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||