|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.codegen.ForceJPAClassGeneratorUtils
public final class ForceJPAClassGeneratorUtils
Shared utilities for the Force.com JPA enabled Java class generator.
Field Summary | |
---|---|
static Set<String> |
ALL_OBJECT_COMMON_FIELDS
The set of fields common to all Force.com objects. |
static Set<String> |
CUSTOM_OBJECT_COMMON_FIELDS
The set of fields common to all Force.com custom objects. |
static String |
INDENT
Represents a tab (consisting of spaces). |
static String |
NEWLINE
Represents a system independent new line character. |
static Set<String> |
STANDARD_OBJECT_COMMON_FIELDS
The set of fields common to *most* Force.com standard objects. |
Method Summary | |
---|---|
static String |
constructPackageName(com.sforce.soap.partner.GetUserInfoResult userInfo)
Constructs a Java package name based on a Force.com store name (Organization name). |
static boolean |
hasAllCommonFields(com.sforce.soap.partner.DescribeSObjectResult dsr)
Determines if a Force.com object has all standard Force.com fields. |
static String |
renderJavaName(com.sforce.soap.partner.DescribeSObjectResult dsr,
boolean firstCharLowerCase)
Constructs a valid Java name from a Force.com DescribeSObjectResult object name. |
static String |
renderJavaName(com.sforce.soap.partner.Field field,
boolean firstCharLowerCase)
Constructs a valid Java name from a Force.com API Field object name. |
static boolean |
useRelationshipName(com.sforce.soap.partner.Field field)
Determines if a Java name should be constructed from the given Force.com API Field object's relationship name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String INDENT
public static final String NEWLINE
public static final Set<String> ALL_OBJECT_COMMON_FIELDS
public static final Set<String> STANDARD_OBJECT_COMMON_FIELDS
public static final Set<String> CUSTOM_OBJECT_COMMON_FIELDS
Method Detail |
---|
public static String constructPackageName(com.sforce.soap.partner.GetUserInfoResult userInfo)
userInfo
- the Force.com user who is running the code generation
null
String
which conforms
to Java class naming standardspublic static boolean hasAllCommonFields(com.sforce.soap.partner.DescribeSObjectResult dsr)
dsr
- a Force.com DescribeSObjectResult
of the object
to be tested
true
if and only if the given object contains all
common Force.com fieldsSTANDARD_OBJECT_COMMON_FIELDS
public static String renderJavaName(com.sforce.soap.partner.DescribeSObjectResult dsr, boolean firstCharLowerCase)
DescribeSObjectResult
object name.
dsr
- a Force.com DescribeSObjectResult
object whose name is to
to converted to a Java namefirstCharLowerCase
- indicates if the first character in the constructed Java
name should be lower case
null
String
which conforms
to Java naming standardspublic static boolean useRelationshipName(com.sforce.soap.partner.Field field)
Field
object's relationship name.
field
- the Force.com API Field
object to test
true
if and only if the given Field
object is a reference field and has a non null
relationship
name and only references exactly one other Force.com objectpublic static String renderJavaName(com.sforce.soap.partner.Field field, boolean firstCharLowerCase)
Field
object name.
field
- a Force.com API Field
object whose name is to
to converted to a Java namefirstCharLowerCase
- indicates if the first character in the constructed Java
name should be lower case
null
String
which conforms
to Java naming standards
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |