|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.codegen.ForceJPAClassGenerator
public class ForceJPAClassGenerator
Generator for Force.com JPA enabled Java classes.
This will generate a closed set of Force.com JPA enabled Java classes based on a list of Force.com schema object (SObject) names from a Force.com store (organization). For example, a caller wishing to generate a Java class for the Account object will get the Account Java class plus the all Java classes to which the Account class will refer (i.e. the Account object's references). If the first name in the list of schema object names is a single star ("*") then the generator will produce Java classes for all known objects in the Force.com store (organization).
A ForceJPAClassGenerator
has a predetermined set of Force.com schema objects that
will always be generated in addition to what is requested by the caller.
Constructor Summary | |
---|---|
ForceJPAClassGenerator(ForceConnectorConfig config,
File destDir)
Initializes a ForceJPAClassGenerator with a ForceConnectorConfig
and a destination (project) directory. |
|
ForceJPAClassGenerator(com.sforce.soap.partner.PartnerConnection conn,
File destDir)
Initializes a ForceJPAClassGenerator with a connection to the Force.com
service and a destination (project) directory. |
|
ForceJPAClassGenerator(String connectionName,
File destDir)
Initializes a ForceJPAClassGenerator with a named ForceConnectorConfig
source and a destination (project) directory. |
Method Summary | |
---|---|
int |
generateJPAClasses(List<String> objectNames)
Execute the Java class generation. |
void |
setPackageName(String packageName)
Sets the Java package name under which the Java classes will be generated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForceJPAClassGenerator(String connectionName, File destDir) throws com.sforce.ws.ConnectionException
ForceJPAClassGenerator
with a named ForceConnectorConfig
source and a destination (project) directory.
The ForceJPAClassGenerator
will obtain a connection to the Force.com service
using the ForceConnectorConfig
source. Generated Java classes will be written
to the destination directory.
connectionName
- a named ForceConnectorConfig
sourcedestDir
- the destination (project) directory to which the generated Java classes
will be written
com.sforce.ws.ConnectionException
- if there is an error connecting to the Force.com servicepublic ForceJPAClassGenerator(ForceConnectorConfig config, File destDir) throws com.sforce.ws.ConnectionException
ForceJPAClassGenerator
with a ForceConnectorConfig
and a destination (project) directory.
The ForceJPAClassGenerator
will obtain a connection to the Force.com service
using the ForceConnectorConfig
. Generated Java classes will be written
to the destination directory.
config
- a ForceConnectorConfig
destDir
- the destination (project) directory to which the generated Java classes
will be written
com.sforce.ws.ConnectionException
- if there is an error connecting to the Force.com servicepublic ForceJPAClassGenerator(com.sforce.soap.partner.PartnerConnection conn, File destDir)
ForceJPAClassGenerator
with a connection to the Force.com
service and a destination (project) directory.
Generated Java classes will be written to the destination directory.
conn
- a PartnerConnection
to the Force.com servicedestDir
- the destination (project) directory to which the generated Java classes
will be writtenMethod Detail |
---|
public void setPackageName(String packageName)
packageName
- a non null
String
which conforms
to Java package naming standardspublic int generateJPAClasses(List<String> objectNames) throws com.sforce.ws.ConnectionException, IOException
objectNames
- the Force.com schema objects that are to be generated as
Java classes (along with their references)
com.sforce.ws.ConnectionException
- if an error occurs trying to connection to the Force.com service
IOException
- if an error occurs trying to write out the generated Java classes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |