com.force.sdk.jpa.table
Class RelationshipImpl
java.lang.Object
com.force.sdk.jpa.table.ColumnImpl
com.force.sdk.jpa.table.RelationshipImpl
public class RelationshipImpl
- extends ColumnImpl
Representation of a collection of related objects on a Force.com object.
If Object A has a lookup field to Object B and B thus has a collection of
Object As, the collection is not actually represented as a field in Force.com,
but rather the lookup to B implies the collection. Because of this we need
to be able to differentiate between these types of columns.
- Author:
- Jill Wetzler
Constructor Summary |
RelationshipImpl(String fieldName)
create a RelationshipImpl with a given field name, such as "Opportunities"
on the account object, or "MyCustomObjects__r". |
RelationshipImpl
public RelationshipImpl(String fieldName)
- create a RelationshipImpl with a given field name, such as "Opportunities"
on the account object, or "MyCustomObjects__r".
- Parameters:
fieldName
- the name of the relationship field
isCustom
public boolean isCustom()
- method that returns whether the relationship is from a custom lookup field
or one that comes standard with Force.com.
- Overrides:
isCustom
in class ColumnImpl
- Returns:
- true if the relationship is custom, false if standard
getFieldName
public String getFieldName()
- Overrides:
getFieldName
in class ColumnImpl
getType
public com.sforce.soap.partner.FieldType getType()
- Description copied from class:
ColumnImpl
- Returns the Force.com API field type for this column.
- Overrides:
getType
in class ColumnImpl
- Returns:
- Force.com API field type
appendSelectString
public boolean appendSelectString(ExpressionBuilderHelper queryHelper,
org.datanucleus.metadata.AbstractClassMetaData acmd,
int fieldNum,
boolean appendComma,
String prefix)
- appends itself to the select statement of a query.
Append an in progress SOQL select string with the right name for this field.
- Overrides:
appendSelectString
in class ColumnImpl
- Parameters:
queryHelper
- the expression builder that is currently in progressacmd
- the class metadata for the entity this field belongs tofieldNum
- the number of this field in DataNucleusappendComma
- whether to append a comma before the fieldprefix
- the prefix to prepend, if necessary
- Returns:
- true if something was appended to the query
getSelectFieldName
public String getSelectFieldName()
- Overrides:
getSelectFieldName
in class ColumnImpl
Copyright © 2011. All Rights Reserved.