|
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.enhance.ApplicationIdTool
Generates a class appropriate for use as an application identity class.
| Inner Class Summary | |
static class |
ApplicationIdTool.Flags
Run flags. |
| Field Summary | |
static String |
TOKEN_DEFAULT
|
| Constructor Summary | |
ApplicationIdTool(JDOConfiguration conf,
Class type)
Constructs a new ApplicationIdTool capable of generating an object id class for type. |
|
ApplicationIdTool(JDOConfiguration conf,
Class type,
ClassMetaData meta)
Constructs a new tool instance capable of generating an object id class for meta. |
|
| Method Summary | |
boolean |
generateCode()
Generates the sourcecode for the application id class; returns false if the class is invalid. |
String |
getCode()
Return the code generated for the application id, or null if invalid class or the run(kodo.conf.JDOConfiguration, java.lang.String[], serp.util.Options) method has not been called. |
serp.util.CodeFormat |
getCodeFormat()
The code formatter for the generated Java code. |
File |
getDirectory()
The directory to write source to. |
boolean |
getIgnoreErrors()
Return false 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. |
Set |
getImportPackages()
Returns the collection of packages that need to be imported. |
ClassMetaData |
getMetaData()
Return metadata for the type we are generating an application id for. |
String |
getToken()
The token to use to separate stringified primary key field values. |
Class |
getType()
Return the type we are generating an application id for. |
Writer |
getWriter()
The writer to write source to, or null to write to default file. |
boolean |
isInnerClass()
Returns true if the application identity class should be an inner class. |
static void |
main(String[] args)
Usage: java kodo.enhance.ApplicationIdTool [option]* <class name | .java file | .class file | .jdo file>+ |
static boolean |
run(JDOConfiguration conf,
String[] args,
ApplicationIdTool.Flags flags,
ClassLoader loader)
Run the tool. |
static boolean |
run(JDOConfiguration conf,
String[] args,
serp.util.Options opts)
Run the application id tool with the given command-line and given configuration. |
void |
setCodeFormat(serp.util.CodeFormat format)
Set the code formatter for the generated Java code. |
void |
setDirectory(File dir)
The directory to write source to. |
void |
setIgnoreErrors(boolean ignore)
Set to false 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 |
setToken(String token)
The token to use to separate stringified primary key field values. |
void |
setWriter(Writer writer)
The writer to write source to, or null to write to default file. |
void |
writeCode()
Writes the generated code to the proper file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String TOKEN_DEFAULT
| Constructor Detail |
public ApplicationIdTool(JDOConfiguration conf,
Class type)
type.
public ApplicationIdTool(JDOConfiguration conf,
Class type,
ClassMetaData meta)
meta.| Method Detail |
public boolean getIgnoreErrors()
public void setIgnoreErrors(boolean ignore)
public serp.util.CodeFormat getCodeFormat()
public void setCodeFormat(serp.util.CodeFormat format)
public File getDirectory()
public void setDirectory(File dir)
public String getToken()
public void setToken(String token)
public Writer getWriter()
public void setWriter(Writer writer)
public Class getType()
public ClassMetaData getMetaData()
public String getCode()
run(kodo.conf.JDOConfiguration, java.lang.String[], serp.util.Options) method has not been called.public boolean isInnerClass()
public boolean generateCode()
public void writeCode()
throws IOException
public Set getImportPackages()
public static void main(String[] args)
throws IOException
Usage: java kodo.enhance.ApplicationIdTool [option]* <class name | .java file | .class file | .jdo file>+
Where the following options are recognized.
Configuration; optional.JDOConfiguration can be
set by using their names and supplying a value; for example:
-licenseKey adslfja83r3lkadfCodeFormat.Each additional argument can be either the full class name of the type to create an id class for, the path to the .java file for the type, 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 boolean run(JDOConfiguration conf,
String[] args,
serp.util.Options opts)
throws IOException
public static boolean run(JDOConfiguration conf,
String[] args,
ApplicationIdTool.Flags flags,
ClassLoader loader)
throws IOException
|
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 | ||||||||