com.force.sdk.jpa.table
Class ColumnImpl

java.lang.Object
  extended by com.force.sdk.jpa.table.ColumnImpl
Direct Known Subclasses:
RelationshipImpl

public class ColumnImpl
extends Object

Representation of a Force.com field.

Author:
Fiaz Hossain

Field Summary
static String CUSTOM_RELATIONSHIP_SUFFIX
          Suffix for Force.com custom relationship.
static String CUSTOM_THING_SUFFIX
          Suffix for Force.com custom object.
protected  String fieldName
           
 
Constructor Summary
ColumnImpl(String fieldName, com.sforce.soap.partner.Field field)
          Create a columnImpl with the name of a field as it would appear in the Force.com SOAP API.
 
Method Summary
protected  void appendPrefix(ExpressionBuilderHelper queryHelper, boolean appendComma, String prefix)
          Append a given prefix during the building of a SOQL query -- used for relationships.
 boolean appendSelectString(ExpressionBuilderHelper queryHelper, org.datanucleus.metadata.AbstractClassMetaData acmd, int fieldNum, boolean appendComma, String prefix)
          Append an in progress SOQL select string with the right name for this field.
 com.sforce.soap.partner.Field getField()
           
 String getFieldName()
           
 String getForceApiName()
           
 String getForceApiRelationshipName()
           
 String getSelectFieldName()
           
 com.sforce.soap.partner.FieldType getType()
          Returns the Force.com API field type for this column.
 boolean isCustom()
          Distinguish whether a field has been created by a user in this organization or whether it comes standard in a Force.com product.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CUSTOM_RELATIONSHIP_SUFFIX

public static final String CUSTOM_RELATIONSHIP_SUFFIX
Suffix for Force.com custom relationship.

See Also:
Constant Field Values

CUSTOM_THING_SUFFIX

public static final String CUSTOM_THING_SUFFIX
Suffix for Force.com custom object.

See Also:
Constant Field Values

fieldName

protected final String fieldName
Constructor Detail

ColumnImpl

public ColumnImpl(String fieldName,
                  com.sforce.soap.partner.Field field)
Create a columnImpl with the name of a field as it would appear in the Force.com SOAP API.

Parameters:
fieldName - the name of a field as it would appear in the Force.com API
field - the Field object for this column
Method Detail

getForceApiName

public String getForceApiName()

getForceApiRelationshipName

public String getForceApiRelationshipName()

getFieldName

public String getFieldName()

getType

public com.sforce.soap.partner.FieldType getType()
Returns the Force.com API field type for this column.

Returns:
Force.com API field type

getField

public com.sforce.soap.partner.Field getField()

isCustom

public boolean isCustom()
Distinguish whether a field has been created by a user in this organization or whether it comes standard in a Force.com product.

Returns:
true if the field is a custom field

appendPrefix

protected void appendPrefix(ExpressionBuilderHelper queryHelper,
                            boolean appendComma,
                            String prefix)
Append a given prefix during the building of a SOQL query -- used for relationships.

Parameters:
queryHelper - the expression builder that is currently in progress
appendComma - whether to append a comma before the prefix
prefix - the prefix to use

appendSelectString

public boolean appendSelectString(ExpressionBuilderHelper queryHelper,
                                  org.datanucleus.metadata.AbstractClassMetaData acmd,
                                  int fieldNum,
                                  boolean appendComma,
                                  String prefix)
Append an in progress SOQL select string with the right name for this field.

Parameters:
queryHelper - the expression builder that is currently in progress
acmd - the class metadata for the entity this field belongs to
fieldNum - the number of this field in DataNucleus
appendComma - whether to append a comma before the field
prefix - the prefix to prepend, if necessary
Returns:
true if something was appended to the query

getSelectFieldName

public String getSelectFieldName()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.