|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.force.sdk.codegen.writer.ForceJPAFileWriterProvider
public class ForceJPAFileWriterProvider
A WriterProvider which provides FileWriters for Force.com JPA
enabled Java classes.
A ForceJPAFileWriterProvider cares about three pieces of state:
ForceJPAFileWriterProvider
will provide a FileWriter to the following file:
/home/tkral/com/force/TestClass.java
A Java package name need not be specified explicitly. If no package name is provided,
ForceJPAFileWriterProvider will create a package name based off of the callers
Force.com store name (i.e. Organization name). Similarly, a Java class name need not
be specified explicitly. If missing, ForceJPAFileWriterProvider will use
the name from a Force.com DescribeSObjectResult object.
| Constructor Summary | |
|---|---|
ForceJPAFileWriterProvider(File destDir)
Initalizes a ForceJPAFileWriterProvider to provide FileWriters
to the given destination (project) directory. |
|
| Method Summary | |
|---|---|
Writer |
getWriter(com.sforce.soap.partner.GetUserInfoResult userInfo,
com.sforce.soap.partner.DescribeSObjectResult dsr)
Returns a Java Writer for generated source code. |
void |
setClassName(String className)
Sets the Java class name of the generate Java classes. |
void |
setPackageName(String packageName)
Sets the Java package name under which the generated Java classes will be written. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ForceJPAFileWriterProvider(File destDir)
ForceJPAFileWriterProvider to provide FileWriters
to the given destination (project) directory.
destDir - a Java File which represents a root project directory| Method Detail |
|---|
public void setClassName(String className)
If no class name is specified, one will be created based
off of a Force.com DescribeSObjectResult object.
className - a non null String which conforms
to Java class naming standardspublic void setPackageName(String packageName)
If no package name is specified, one will be created based off of the callers Force.com store name (i.e. Organization name).
packageName - a non null String which conforms
to Java package naming standardsForceJPAClassGeneratorUtils.constructPackageName(GetUserInfoResult),
ForceJPAClassDataSelector.setPackageName(String)
public Writer getWriter(com.sforce.soap.partner.GetUserInfoResult userInfo,
com.sforce.soap.partner.DescribeSObjectResult dsr)
throws IOException
WriterProviderWriter for generated source code.
The Writer that is returned represents the destination
for the source code that is generated from the given GetUserInfoResult
object and DescribeSObjectResult object.
getWriter in interface WriterProvideruserInfo - the Force.com user who is running the code generationdsr - the Force.com schema object for which code will be generated
null Java Writer to which generated code will be written
IOException - if the Java Writer cannot be created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||