com.force.sdk.jpa.table
Class ForceColumnMetaData

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.ForceColumnMetaData

public class ForceColumnMetaData
extends ForceMetaData

Metadata for fields on Force.com objects. This class is what knows how to turn fields in your @Entity java classes into CustomFields that can be read by the Force.com metadata API. Fields are stored off on the ForceTableMetaData object and optionally handed to the ForceSchemaWriter

Author:
Fiaz Hossain, Jill Wetzler

Field Summary
static Set<String> STANDARD_FIELDS
          fields that are standard on all Force.com objects.
 
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
ForceColumnMetaData(org.datanucleus.metadata.AbstractClassMetaData cmd, TableImpl table, ForceStoreManager storeManager)
          Create the column metadata for field registration and possible schema creation.
 
Method Summary
 void addFieldsToObject(com.sforce.soap.metadata.CustomObject customObject)
          Add all of the fields for this table to the object.
 void createFieldSchema(String namespace)
          Checks to see if columns should be created according to persistence properties, and if so, creates CustomField objects and stores them on the parent table to be created later by the ForceSchemaWriter.
 
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
 

Field Detail

STANDARD_FIELDS

public static final Set<String> STANDARD_FIELDS
fields that are standard on all Force.com objects.

Constructor Detail

ForceColumnMetaData

public ForceColumnMetaData(org.datanucleus.metadata.AbstractClassMetaData cmd,
                           TableImpl table,
                           ForceStoreManager storeManager)
Create the column metadata for field registration and possible schema creation.

Parameters:
cmd - the class this column belongs to
table - the table where this column is found
storeManager - the store manager
Method Detail

addFieldsToObject

public void addFieldsToObject(com.sforce.soap.metadata.CustomObject customObject)
Add all of the fields for this table to the object. We may need to merge with any existing fields in the case of Entities that extend other entities. There is only one CustomObject representing all of the entities and we need the intersection of their fields

Parameters:
customObject - CustomObject

createFieldSchema

public void createFieldSchema(String namespace)
Checks to see if columns should be created according to persistence properties, and if so, creates CustomField objects and stores them on the parent table to be created later by the ForceSchemaWriter.

Parameters:
namespace - the namespace of the organization creating schema


Copyright © 2011. All Rights Reserved.