|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.jpa.schema.ForceAsyncResultProcessor
com.force.sdk.jpa.schema.ForceSchemaWriter
public class ForceSchemaWriter
Writes schema to Force.com database using the metadata API. It can be used to create or delete objects/fields
Field Summary |
---|
Fields inherited from class com.force.sdk.jpa.schema.ForceAsyncResultProcessor |
---|
LOGGER |
Constructor Summary | |
---|---|
ForceSchemaWriter(SchemaDeleteProperty deleteProperty)
Create a schema writer for generating the deploy zip and using the metadata API to manipulate schema. |
Method Summary | |
---|---|
void |
addCustomField(com.sforce.soap.metadata.CustomObject object,
com.sforce.soap.metadata.CustomField field)
add a custom field to the map which will be written to the package file later for deployment. |
void |
addCustomObject(com.sforce.soap.metadata.CustomObject object,
org.datanucleus.metadata.AbstractClassMetaData cmd,
ForceStoreManager storeManager,
ForceMetaData fmd)
Adds a custom object to the map of objects that will be created or deleted. |
void |
addCustomObject(com.sforce.soap.metadata.CustomObject object,
boolean includeInPackageFile)
This method is used by test cleanup. |
void |
write(ForceManagedConnection mconn)
create the proper deploy zip and make the metadata API call. |
Methods inherited from class com.force.sdk.jpa.schema.ForceAsyncResultProcessor |
---|
waitForAsyncResult |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForceSchemaWriter(SchemaDeleteProperty deleteProperty)
deleteProperty
- whether this application has been started with a persistence.xml
property that causes schema to be deleted rather than upserted,
may also have purgeOnDeleteSchema setMethod Detail |
---|
public void addCustomObject(com.sforce.soap.metadata.CustomObject object, org.datanucleus.metadata.AbstractClassMetaData cmd, ForceStoreManager storeManager, ForceMetaData fmd)
object
- the CustomObject
to write to the deploy filecmd
- the metadata of the JPA entity the CustomObject representsstoreManager
- the store manager for entitiesfmd
- the Force.com specific metadata for this objectpublic void addCustomObject(com.sforce.soap.metadata.CustomObject object, boolean includeInPackageFile)
addCustomObject(com.sforce.soap.metadata.CustomObject,
org.datanucleus.metadata.AbstractClassMetaData, com.force.sdk.jpa.ForceStoreManager,
com.force.sdk.jpa.table.ForceMetaData)
if you're intending to use schemaCreation. includeInPackageFile
can be true or false depending on the table metadata.
object
- the object to be included in schema creation or deletionincludeInPackageFile
- whether the package.xml or destructiveChanges.xml file should include this objectpublic void addCustomField(com.sforce.soap.metadata.CustomObject object, com.sforce.soap.metadata.CustomField field)
object
- the custom object this field belongs tofield
- the CustomField
object that will be upserted or deletedpublic void write(ForceManagedConnection mconn) throws Exception
mconn
- the metdata API connection
Exception
- thrown if something goes wrong during the schema write
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |