|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.codegen.CodeGenerator
public final class CodeGenerator
Basic Code Generator.
The generator will load up all Force.com schema object (SObject) information
for a given Force.com store (organization). It then filters and selects
the data that is necessary for code generation and writes
this to a Template
.
Notice that code generation is analogous to MVC (well, at least the MV parts):
DataFilter
, DataSelector
. This provides the data that will
be used in the template.
Template
. This represents the physical layout of
the code being generated.
WriterProvider
provides Jave Writer
s to the CodeGenerator
to tell it where to write the generated code.
Nested Class Summary | |
---|---|
static class |
CodeGenerator.Builder
Builder pattern for CodeGenerator . |
Method Summary | |
---|---|
int |
generateCode(com.sforce.soap.partner.PartnerConnection conn)
Generates code based on a connection to a Force.com store (organization). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int generateCode(com.sforce.soap.partner.PartnerConnection conn) throws com.sforce.ws.ConnectionException, IOException
This will make various Force.com API calls to a Force.com store. First, it will run a global describe. Next, it will run full describes on the global describe results. These calls will be batched in the most efficient way possible (that is, making the least number of Force.com API calls).
The full describe results will be filtered and injected into a Template
whose contents will then be written to a Java Writer
.
conn
- a Force.com API connection to the Force.com store (organization)
that is to be described for code generation
com.sforce.ws.ConnectionException
- if an error occurs while connecting to the Force.com
store (organization)
IOException
- if an error occurs while writing the generated code
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |