<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.6.0_11) on Wed Jul 20 09:13:14 CDT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
CodeGenerator (OpenJPA Parent POM 2.1.1 API) | |
</TITLE> | |
<META NAME="date" CONTENT="2011-07-20"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="CodeGenerator (OpenJPA Parent POM 2.1.1 API)"; | |
} | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<HR> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CodeGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="CodeGenerator.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.enhance</FONT> | |
<BR> | |
Class CodeGenerator</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.openjpa.enhance.CodeGenerator</B> | |
</PRE> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>CodeGenerator</B><DT>extends <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> | |
</PRE> | |
<P> | |
Generates Java class code from metadata. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>0.3.0</DD> | |
<DT><B>Author:</B></DT> | |
<DD>Abe White, Stephen Kim</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator(org.apache.openjpa.meta.ClassMetaData)">CodeGenerator</A></B>(<A HREF="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</A> meta)</CODE> | |
<BR> | |
Constructor.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.Class)">CodeGenerator</A></B>(<A HREF="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> type)</CODE> | |
<BR> | |
Constructor.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#closeClassBrace(org.apache.openjpa.lib.util.CodeFormat)">closeClassBrace</A></B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> code)</CODE> | |
<BR> | |
Append the closing code-level brace to the code; this can be | |
overridden to add code to the bottom of the class.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()">generateCode</A></B>()</CODE> | |
<BR> | |
Writes the generated code to the proper directory.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassAnnotations()">getClassAnnotations</A></B>()</CODE> | |
<BR> | |
Return class-level annotations.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassCode()">getClassCode</A></B>()</CODE> | |
<BR> | |
Return a code template for the given class, or null to use the standard | |
system-generated Java code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCode()">getCode</A></B>()</CODE> | |
<BR> | |
Return the generated code, or null if <A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()"><CODE>generateCode()</CODE></A> has not | |
been called.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeDirectory()">getCodeDirectory</A></B>()</CODE> | |
<BR> | |
The directory to write source to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeFormat()">getCodeFormat</A></B>()</CODE> | |
<BR> | |
The code formatter for the generated Java code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getDeclaration(org.apache.openjpa.meta.FieldMetaData)">getDeclaration</A></B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</CODE> | |
<BR> | |
Return a code template for the declaration of the given field, or null | |
to use the system-generated default Java code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldAnnotations(org.apache.openjpa.meta.FieldMetaData)">getFieldAnnotations</A></B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</CODE> | |
<BR> | |
Return field-level annotations.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldCode(org.apache.openjpa.meta.FieldMetaData)">getFieldCode</A></B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</CODE> | |
<BR> | |
Return a code template for the get/set methods of the given field, or | |
null to use the system-generated default Java code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFile()">getFile</A></B>()</CODE> | |
<BR> | |
Return Java file to write to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getImportPackages()">getImportPackages</A></B>()</CODE> | |
<BR> | |
Returns the set of packages that needs to be imported for this code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getInitialValue(org.apache.openjpa.meta.FieldMetaData)">getInitialValue</A></B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</CODE> | |
<BR> | |
Return code for the initial value for the given field, or null to use | |
the default generated by the system.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getMetaData()">getMetaData</A></B>()</CODE> | |
<BR> | |
Return metadata for the type being generated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getType()">getType</A></B>()</CODE> | |
<BR> | |
Return the type being generated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#newCodeFormat()">newCodeFormat</A></B>()</CODE> | |
<BR> | |
Return a copy of the internal code format.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#openClassBrace(org.apache.openjpa.lib.util.CodeFormat)">openClassBrace</A></B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> code)</CODE> | |
<BR> | |
Append the opening code-level brace to the code; this can be | |
overridden to add code to the top of the class.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setCodeFormat(org.apache.openjpa.lib.util.CodeFormat)">setCodeFormat</A></B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> format)</CODE> | |
<BR> | |
Set the code formatter for the generated Java code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setDirectory(java.io.File)">setDirectory</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> dir)</CODE> | |
<BR> | |
The directory to write source to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#useGenericCollections()">useGenericCollections</A></B>()</CODE> | |
<BR> | |
Whether to use generic collections on one-to-many and many-to-many | |
relations instead of untyped collections.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#usePropertyBasedAccess()">usePropertyBasedAccess</A></B>()</CODE> | |
<BR> | |
Whether to use property-based access on generated code.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode()">writeCode</A></B>()</CODE> | |
<BR> | |
Write the generated code to the proper file.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode(java.io.Writer)">writeCode</A></B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> out)</CODE> | |
<BR> | |
Write the code to the specified <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><CODE>Writer</CODE></A>.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="CodeGenerator(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.Class)"><!-- --></A><H3> | |
CodeGenerator</H3> | |
<PRE> | |
public <B>CodeGenerator</B>(<A HREF="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> type)</PRE> | |
<DL> | |
<DD>Constructor. Supply configuration and class to generate code for. | |
<P> | |
</DL> | |
<HR> | |
<A NAME="CodeGenerator(org.apache.openjpa.meta.ClassMetaData)"><!-- --></A><H3> | |
CodeGenerator</H3> | |
<PRE> | |
public <B>CodeGenerator</B>(<A HREF="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</A> meta)</PRE> | |
<DL> | |
<DD>Constructor. Supply configuration and metadata to generate code for. | |
<P> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="getCodeDirectory()"><!-- --></A><H3> | |
getCodeDirectory</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> <B>getCodeDirectory</B>()</PRE> | |
<DL> | |
<DD>The directory to write source to. Defaults to the current directory. | |
If the given directory does not match the package of the metadata, the | |
package structure will be created below the directory. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setDirectory(java.io.File)"><!-- --></A><H3> | |
setDirectory</H3> | |
<PRE> | |
public void <B>setDirectory</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> dir)</PRE> | |
<DL> | |
<DD>The directory to write source to. Defaults to the current directory. | |
If the given directory does not match the package of the metadata, the | |
package structure will be created below the directory. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getCodeFormat()"><!-- --></A><H3> | |
getCodeFormat</H3> | |
<PRE> | |
public <A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> <B>getCodeFormat</B>()</PRE> | |
<DL> | |
<DD>The code formatter for the generated Java code. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setCodeFormat(org.apache.openjpa.lib.util.CodeFormat)"><!-- --></A><H3> | |
setCodeFormat</H3> | |
<PRE> | |
public void <B>setCodeFormat</B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> format)</PRE> | |
<DL> | |
<DD>Set the code formatter for the generated Java code. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getType()"><!-- --></A><H3> | |
getType</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A> <B>getType</B>()</PRE> | |
<DL> | |
<DD>Return the type being generated. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMetaData()"><!-- --></A><H3> | |
getMetaData</H3> | |
<PRE> | |
public <A HREF="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</A> <B>getMetaData</B>()</PRE> | |
<DL> | |
<DD>Return metadata for the type being generated. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getCode()"><!-- --></A><H3> | |
getCode</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getCode</B>()</PRE> | |
<DL> | |
<DD>Return the generated code, or null if <A HREF="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()"><CODE>generateCode()</CODE></A> has not | |
been called. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="generateCode()"><!-- --></A><H3> | |
generateCode</H3> | |
<PRE> | |
public void <B>generateCode</B>()</PRE> | |
<DL> | |
<DD>Writes the generated code to the proper directory. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="writeCode()"><!-- --></A><H3> | |
writeCode</H3> | |
<PRE> | |
public void <B>writeCode</B>() | |
throws <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD>Write the generated code to the proper file. | |
<P> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="writeCode(java.io.Writer)"><!-- --></A><H3> | |
writeCode</H3> | |
<PRE> | |
public void <B>writeCode</B>(<A HREF="http://java.sun.com/j2se/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</A> out) | |
throws <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD>Write the code to the specified <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><CODE>Writer</CODE></A>. | |
<P> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getImportPackages()"><!-- --></A><H3> | |
getImportPackages</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A> <B>getImportPackages</B>()</PRE> | |
<DL> | |
<DD>Returns the set of packages that needs to be imported for this code. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="openClassBrace(org.apache.openjpa.lib.util.CodeFormat)"><!-- --></A><H3> | |
openClassBrace</H3> | |
<PRE> | |
protected void <B>openClassBrace</B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> code)</PRE> | |
<DL> | |
<DD>Append the opening code-level brace to the code; this can be | |
overridden to add code to the top of the class. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="closeClassBrace(org.apache.openjpa.lib.util.CodeFormat)"><!-- --></A><H3> | |
closeClassBrace</H3> | |
<PRE> | |
protected void <B>closeClassBrace</B>(<A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> code)</PRE> | |
<DL> | |
<DD>Append the closing code-level brace to the code; this can be | |
overridden to add code to the bottom of the class. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFile()"><!-- --></A><H3> | |
getFile</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</A> <B>getFile</B>()</PRE> | |
<DL> | |
<DD>Return Java file to write to. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="newCodeFormat()"><!-- --></A><H3> | |
newCodeFormat</H3> | |
<PRE> | |
protected <A HREF="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</A> <B>newCodeFormat</B>()</PRE> | |
<DL> | |
<DD>Return a copy of the internal code format. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getClassCode()"><!-- --></A><H3> | |
getClassCode</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getClassCode</B>()</PRE> | |
<DL> | |
<DD>Return a code template for the given class, or null to use the standard | |
system-generated Java code. To facilitate template reuse, the | |
following parameters can appear in the template; the proper values | |
will be subtituted by the system: | |
<ul> | |
<li>${packageDec}: The package declaration, in the form | |
"package <package name >;", or empty string if no package.</li> | |
<li>${imports}: Imports for the packages used by the declared | |
field types.</li> | |
<li>${className}: The name of the class, without package.</li> | |
<li>${extendsDec}: Extends declaration, in the form | |
"extends <superclass>", or empty string if no superclass.</li> | |
<li>${constructor}: A constructor that takes in all primary key fields | |
of the class, or empty string if the class uses datastore identity.</li> | |
<li>${fieldDecs}: Declarations of all the declared fields.</li> | |
<li>${fieldCode}: Get/set methods for all the declared fields.</li> | |
</ul> Returns null by default. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getInitialValue(org.apache.openjpa.meta.FieldMetaData)"><!-- --></A><H3> | |
getInitialValue</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getInitialValue</B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</PRE> | |
<DL> | |
<DD>Return code for the initial value for the given field, or null to use | |
the default generated by the system. Returns null by default. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getDeclaration(org.apache.openjpa.meta.FieldMetaData)"><!-- --></A><H3> | |
getDeclaration</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getDeclaration</B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</PRE> | |
<DL> | |
<DD>Return a code template for the declaration of the given field, or null | |
to use the system-generated default Java code. | |
To facilitate template reuse, the following parameters can appear in | |
your template; the proper values will be subtituted by the system: | |
<ul> | |
<li>${fieldName}: The name of the field.</li> | |
<li>${capFieldName}: The capitalized field name.</li> | |
<li>${propertyName}: The field name without leading '_', if any.</li> | |
<li>${fieldType}: The field's type name.</li> | |
<li>${keyType}: Key type name for maps, null otherwise.</li> | |
<li>${elementType}: Element type name for collections, null otherwise. | |
</li> | |
<li>${fieldValue}: The field's initial value, in the form | |
" = <value>", or empty string if none.</li> | |
</ul> Returns null by default. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFieldCode(org.apache.openjpa.meta.FieldMetaData)"><!-- --></A><H3> | |
getFieldCode</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getFieldCode</B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</PRE> | |
<DL> | |
<DD>Return a code template for the get/set methods of the given field, or | |
null to use the system-generated default Java code. | |
To facilitate template reuse, the following parameters can appear in | |
your template; the proper values will be subtituted by the system: | |
<ul> | |
<li>${fieldName}: The name of the field.</li> | |
<li>${capFieldName}: The capitalized field name.</li> | |
<li>${propertyName}: The field name without leading '_', if any.</li> | |
<li>${fieldType}: The field's type name.</li> | |
<li>${keyType}: Key type name for maps, null otherwise.</li> | |
<li>${elementType}: Element type name for collections, null otherwise. | |
</li> | |
<li>${fieldValue}: The field's initial value, in the form | |
"= <value>", or empty string if none.</li> | |
</ul> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="usePropertyBasedAccess()"><!-- --></A><H3> | |
usePropertyBasedAccess</H3> | |
<PRE> | |
protected boolean <B>usePropertyBasedAccess</B>()</PRE> | |
<DL> | |
<DD>Whether to use property-based access on generated code. | |
Defaults to false (field-based). | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getClassAnnotations()"><!-- --></A><H3> | |
getClassAnnotations</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A> <B>getClassAnnotations</B>()</PRE> | |
<DL> | |
<DD>Return class-level annotations. Returns null by default. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFieldAnnotations(org.apache.openjpa.meta.FieldMetaData)"><!-- --></A><H3> | |
getFieldAnnotations</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A> <B>getFieldAnnotations</B>(<A HREF="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</A> field)</PRE> | |
<DL> | |
<DD>Return field-level annotations. Returns null by default. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="useGenericCollections()"><!-- --></A><H3> | |
useGenericCollections</H3> | |
<PRE> | |
protected boolean <B>useGenericCollections</B>()</PRE> | |
<DL> | |
<DD>Whether to use generic collections on one-to-many and many-to-many | |
relations instead of untyped collections. | |
Override in descendants to change default behavior. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CodeGenerator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="CodeGenerator.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2011 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |