|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.solarmetric.kodo.enhance.ApplicationIdTool
Generates a class appropriate for use as an application identity class.
| Constructor Summary | |
ApplicationIdTool(Class type,
Configuration conf)
Constructs a new ApplicationIdTool capable of generating an object id class for type. |
|
| Method Summary | |
boolean |
generateApplicationId()
Generates the sourcecode for the application id class; returns false if the class is invalid. |
String |
getApplicationIdCode()
Return the code generated for the application id, or null if invalid class or the generateApplicationId() method
has not been called. |
ClassMetaData |
getClassMetaData()
Return the ClassMetaData object for the class, or null
if not persistence capable. |
boolean |
getDieOnInvalid()
Return true if this tool is configured to throw an exception on an attempt to generate an id class for a type that does not use application identity. |
File |
getFile()
Return the file that this tool should output to. |
PrintStream |
getLog()
Return the stream being used for logging, or null if none. |
Class |
getSourceType()
Return the type we are generating an application id for. |
boolean |
isApplicationIdentity()
Return true if the class uses application identity, false otherwise. |
static void |
main(String[] args)
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .class file | .jdo file>+ |
void |
setDieOnInvalid(boolean die)
Set to true if this tool should throw an exception on an attempt to generate an id class for a type that does not use application identity. |
void |
setLog(PrintStream log)
Set the stream to use for status messages, or null if none. |
void |
writeApplicationId()
Writes the generated code to the proper file. |
static void |
writeApplicationId(Class type,
boolean die,
PrintStream log,
Configuration conf)
Generate an application id source file for the given type. |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public ApplicationIdTool(Class type,
Configuration conf)
throws IOException
type.| Method Detail |
public static void main(String[] args)
throws IOException
Usage: java com.solarmetric.kodo.enhance.JDOEnhancer [option]* <class name | .class file | .jdo file>+
Where the following options are recognized.
Configuration; optionalConfiguration can be set by using
their names and supplying a value; for example:
-licenseKey adslfja83r3lkadfIf the license key is not specified otherwise, Kodo will check for
default preference files with license keys as outlined in
DefaultConfiguration.
Each additional argument can be either the full class name of the type to create an id class for, the path to the .class file for the type, or the path to a .jdo file listing one or more types. If a .java file already exists for an application id, it will be backed up to a file named <orig file name>~.
public static void writeApplicationId(Class type,
boolean die,
PrintStream log,
Configuration conf)
throws IOException
type - the type to generate an id fordie - if true, throw an exception if the given type does
not need an application identity classlog - the stream to log messages to, or null for no logconf - the system configurationIOException - if unable to save sourcepublic Class getSourceType()
public PrintStream getLog()
public void setLog(PrintStream log)
public boolean getDieOnInvalid()
public void setDieOnInvalid(boolean die)
public boolean isApplicationIdentity()
public ClassMetaData getClassMetaData()
ClassMetaData object for the class, or null
if not persistence capable.public String getApplicationIdCode()
generateApplicationId() method
has not been called.public File getFile()
public boolean generateApplicationId()
throws IOException
public void writeApplicationId()
throws IOException
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||