|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
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)
ReverseCustomizer
setConfiguration
in interface ReverseCustomizer
public void setTool(ReverseMappingTool tool)
ReverseCustomizer
setTool
in interface ReverseCustomizer
public boolean isSubclassTable(Table table)
ReverseCustomizer
isSubclassTable
in interface ReverseCustomizer
public boolean customize(ClassMapping mapping)
ReverseCustomizer
ReverseMappingTool.generateClass(java.lang.String, java.lang.Class)
to creat a new class object,
then setting it with ClassMetaData.setDescribedType(java.lang.Class)
). The
mapping will not have any fields yet when this method is called.customize
in interface ReverseCustomizer
kodo.jdbc.meta.ReverseCustomizer
public String getClassCode(ClassMapping mapping)
ReverseCustomizer
getClassCode
in interface ReverseCustomizer
public boolean customize(FieldMapping mapping)
ReverseCustomizer
customize
in interface ReverseCustomizer
kodo.jdbc.meta.ReverseCustomizer
public String getInitialValue(FieldMapping field)
ReverseCustomizer
getInitialValue
in interface ReverseCustomizer
public String getDeclaration(FieldMapping field)
ReverseCustomizer
getDeclaration
in interface ReverseCustomizer
public String getFieldCode(FieldMapping field)
ReverseCustomizer
getFieldCode
in interface ReverseCustomizer
public boolean unmappedTable(Table table)
ReverseCustomizer
ReverseMappingTool.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 ReverseCustomizer
kodo.jdbc.meta.ReverseCustomizer
|
SolarMetric Kodo JDO 3.3.5 generated on August 31 2005 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |