com.force.sdk.jpa.table
Class ForceTableMetaData

java.lang.Object
  extended by com.force.sdk.jpa.schema.ForceAsyncResultProcessor
      extended by com.force.sdk.jpa.table.ForceMetaData
          extended by com.force.sdk.jpa.table.ForceTableMetaData

public class ForceTableMetaData
extends ForceMetaData

Metadata for Force.com objects. This class converts your non-read-only @Entity java classes into CustomObjects that the Force.com metadata API can read. The CustomObject gets updated with any specified fields and if schema creation is enabled, the object is emitted to the ForceSchemaWriter to be deployed to the developer's org.

Author:
Fiaz Hossain, Jill Wetzler

Field Summary
 
Fields inherited from class com.force.sdk.jpa.table.ForceMetaData
cmd, customObject, isReadOnlyFields, isReadOnlyTable, tableImpl
 
Fields inherited from class com.force.sdk.jpa.schema.ForceAsyncResultProcessor
LOGGER
 
Constructor Summary
ForceTableMetaData(org.datanucleus.metadata.AbstractClassMetaData cmd, TableImpl tableImpl)
          Create the metadata for an object in Force.com.
 
Method Summary
 void createCustomFields(org.datanucleus.metadata.AbstractClassMetaData cmd, ForceStoreManager storeManager)
          This method should be called only if it has been determined that field schema should be created (or deleted).
 void createCustomObject(org.datanucleus.metadata.AbstractClassMetaData cmd, ForceStoreManager storeManager, ForceManagedConnection mconn)
          This method should be called only if it has been determined that table schema should be created (or deleted).
 void emit(ForceStoreManager storeManager, ForceManagedConnection mconn)
          if a CustomObject needed to be created for this entity, pass it to the schema writer which will store it and then later write all objects and fields at once.
 
Methods inherited from class com.force.sdk.jpa.table.ForceMetaData
createCustomObjectStub, getBooleanFromForceAnnotation, getIntegerFromForceAnnotation, getIsReadOnlyTable, getTableImpl, getTreatBlanksAsFromForceAnnotation, removeCustomThingSuffix
 
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

ForceTableMetaData

public ForceTableMetaData(org.datanucleus.metadata.AbstractClassMetaData cmd,
                          TableImpl tableImpl)
Create the metadata for an object in Force.com.

Parameters:
cmd - the class metadata for the entity
tableImpl - the table object
Method Detail

emit

public void emit(ForceStoreManager storeManager,
                 ForceManagedConnection mconn)
if a CustomObject needed to be created for this entity, pass it to the schema writer which will store it and then later write all objects and fields at once. Pass all fields on the custom object to the schema writer as well

Parameters:
storeManager - the store manager
mconn - the managed connection that contains connections for the Force.com APIs

createCustomObject

public void createCustomObject(org.datanucleus.metadata.AbstractClassMetaData cmd,
                               ForceStoreManager storeManager,
                               ForceManagedConnection mconn)
This method should be called only if it has been determined that table schema should be created (or deleted). Create the CustomObject for the metadata API to use during deploy

Parameters:
cmd - the class metadata for the entity
storeManager - the store manager
mconn - the managed connection that contains connections to the Force.com APIs

createCustomFields

public void createCustomFields(org.datanucleus.metadata.AbstractClassMetaData cmd,
                               ForceStoreManager storeManager)
This method should be called only if it has been determined that field schema should be created (or deleted). Create the CustomField for the metadata API to use during deploy

Parameters:
cmd - the class metadata for the entity
storeManager - the store manager


Copyright © 2011. All Rights Reserved.