|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BOHelper<T extends BusinessObject>
Interface to business object helper classes used to simplify access to business objects exposed in the API.
Method Summary | |
---|---|
boolean |
canCreate()
Indicates whether this type of business object class has create methods. |
boolean |
canDelete()
Indicates whether this type of business object class has delete methods. |
boolean |
canUpdate()
Indicates whether this type of business object class has update methods. |
ObjectId[] |
create(Session session,
java.util.List<? extends BusinessObject> alObjects)
Creates multiple business objects of this type in the database. |
T[] |
createBusinessObjectArray(int iSize)
Creates an array of a particular business object type. |
void |
delete(Session session,
java.util.List<? extends BusinessObject> alObjects)
Deletes business objects of this type. |
void |
delete(Session session,
java.util.List<? extends BusinessObject> alObjects,
ObjectId replacementParent)
Deletes business objects of this type, specifying a replacement parent |
java.lang.String[] |
getAllFields()
Gets all non-code and non-UDF fields for this business object |
java.lang.String[] |
getAllParentClassNames()
Gets the class names of all parents that can be used to load this business object using a where clause. |
java.lang.String |
getClassName()
Gets the name of the business object class. |
java.lang.String |
getClassNameFromObjectIdFieldName(java.lang.String objectIdFieldName)
Gets the class name from an ObjectId field name. |
java.lang.String |
getCodeValue(BusinessObject bo,
ObjectId codeTypeObjectId)
Gets the value of a particular code value for the given business object. |
ObjectId |
getCodeValueObjectId(BusinessObject bo,
ObjectId codeTypeObjectId)
Gets the value of a particular code value for the given business object. |
java.lang.String |
getDefaultParentClassName()
Gets the name of the parent class that is most commonly used for loading this type of business object. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getDeleteAssociations()
Gets a map of delete associations that this business object has to other business objects. |
int |
getFieldType(java.lang.String sFieldName)
Gets the type of a given field in the business object class. |
java.lang.String[] |
getFilterableFields()
Gets all non-code and non-UDF fields for this business object. |
java.lang.String[] |
getKeyFields()
Gets the key field names used for this class. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getLoadAssociations()
Gets a map of load associations that this business object has to other business objects. |
java.lang.String[] |
getMainFields()
Gets all fields that are not code, UDF, or summary fields. |
java.lang.Integer |
getMaxFieldLength(Session session,
java.lang.String fieldName)
Retrieves the field length limit for string type field. |
java.lang.String[] |
getMinimumXMLExportFields()
Gets all fields that are always exported at a minimum by the new flat XML exporter |
java.lang.String[] |
getObjectIdFieldNames()
Gets an array of ObjectId field names that exist as fields in this business object class. |
java.lang.String |
getPluralName()
Gets the plural name of the business object class. |
java.lang.String[] |
getRequiredCreateFields()
Gets all fields that are filterable. |
java.lang.String |
getUDFValue(BusinessObject bo,
ObjectId typeObjectId,
UDFDataType type)
Gets the value of a particular UDF field for the given business object. |
java.lang.Object |
getUDFValueAsObject(BusinessObject bo,
ObjectId typeObjectId,
UDFDataType type)
Gets the value as an Object of a particular UDF field for the given business object. |
java.lang.String |
getValue(BusinessObject bo,
java.lang.String sFieldName)
Gets the value as a String of a particular field that was loaded for the given business object. |
java.lang.Object |
getValueAsObject(BusinessObject bo,
java.lang.String sFieldName)
Gets the value as an Object of a particular field that was loaded for the given business object. |
java.lang.String[] |
getWritableFields()
Gets all writable non-code and non-UDF fields for this business object |
boolean |
hasFieldValue(BusinessObject bo,
java.lang.String fieldName)
Checks if the business object has a value for the specified field |
boolean |
hasMultiPartKey()
Indicates whether this type of business object has a multi-part ObjectId. |
boolean |
isAssociatedClass(java.lang.String sName)
Indicates whether the given class has an association to this business object class. |
boolean |
isField(java.lang.String sName)
Indicates whether the given field is a valid field for this business object class. |
boolean |
isFilterableField(java.lang.String sName)
Indicates whether the given field is a filterable field in this business object class. |
boolean |
isGlobal()
Indicates whether the business object class is global and therefore accessible from the GlobalObjectManager. |
boolean |
isHierarchical()
Indicates whether this type of business object is hierarchical. |
boolean |
isScriptableField(java.lang.String sName)
Indicates whether the given field is a scriptable field in this business object class. |
boolean |
isSingular()
Indicates whether this type of business object is singular (one and only one instance exists in the database). |
boolean |
isWritableField(java.lang.String sName)
Indicates whether the given field is a writable field in this business object class. |
BOIterator<T> |
load(Session session,
BusinessObject boParent,
java.lang.String[] fields,
java.lang.String sWhereClause,
java.lang.String sOrderBy)
Loads business objects of this type from a given parent. |
T |
load(Session session,
java.lang.String[] fields,
ObjectId objId)
Loads a business object of this type by ObjectId. |
BOIterator<T> |
load(Session session,
java.lang.String[] fields,
ObjectId[] objIds)
Loads multiple business objects of this type by ObjectId. |
T |
newBusinessObject(Session session)
Creates a new client-side instance of this type of business object; call create() on the object to add it to the database. |
T |
newBusinessObject(Session session,
java.util.Map<java.lang.String,java.lang.String> fieldValueMap)
Creates a new client-side instance of this type of business object and sets its field values from a map |
T |
newBusinessObject(Session session,
ObjectId objectId)
Creates a new client-side instance of this type of business object and sets its unique ID. |
void |
setCodeValueObjectId(BusinessObject bo,
ObjectId codeTypeObjectId,
ObjectId codeValueObjectId)
Gets the value of a particular code value for the given business object. |
void |
setUDFValue(BusinessObject bo,
ObjectId typeObjectId,
UDFDataType type,
java.lang.String sValue)
Sets the value of a particular UDF field for the given business object. |
void |
setValue(BusinessObject bo,
java.lang.String sFieldName,
java.lang.String sValue)
Sets the value of a particular field for the given business object. |
void |
setValues(BusinessObject bo,
java.util.Map<java.lang.String,java.lang.String> fieldValueMap)
Sets field values (from a map) for the given business object |
boolean |
supportsCodes()
Indicates whether this type of business object supports codes. |
boolean |
supportsLiveSpreads()
Indicates whether this type of business object supports live spread data. |
boolean |
supportsSummarizedSreads()
Indicates whether this type of business object supports summarized spread data. |
boolean |
supportsUDF()
Indicates whether this type of business object supports user-defined fields (UDFs). |
boolean |
supportsUDFCode()
Indicates whether this type of business object supports UDFCode. |
void |
update(Session session,
java.util.List<? extends BusinessObject> alObjects)
Updates business objects of this type. |
Method Detail |
---|
java.lang.String getClassName()
java.lang.String getPluralName()
boolean isField(java.lang.String sName)
sName
- the name of the field
boolean isWritableField(java.lang.String sName)
sName
- the name of the field
boolean isScriptableField(java.lang.String sName)
setValue(..)
and getValue()
methods
sName
- the name of the field
int getFieldType(java.lang.String sFieldName) throws InvalidFieldException
sFieldName
- the name of a field in the class
InvalidFieldException
- if the specified field name is not validboolean isFilterableField(java.lang.String sName)
sName
- the name of the field
java.lang.String[] getKeyFields()
boolean isAssociatedClass(java.lang.String sName)
sName
- the name of the class
boolean isGlobal()
boolean canCreate()
boolean canUpdate()
boolean canDelete()
boolean hasMultiPartKey()
boolean isHierarchical()
boolean isSingular()
boolean supportsLiveSpreads()
boolean supportsSummarizedSreads()
boolean supportsUDF()
boolean supportsUDFCode()
boolean supportsCodes()
java.lang.Object getValueAsObject(BusinessObject bo, java.lang.String sFieldName) throws BusinessObjectException
bo
- the business objectsFieldName
- the name of the field
BusinessObjectException
- if the get method could not be invokedjava.lang.String getValue(BusinessObject bo, java.lang.String sFieldName) throws BusinessObjectException
bo
- the business objectsFieldName
- the name of the field
BusinessObjectException
- if the get method could not be invokedvoid setValue(BusinessObject bo, java.lang.String sFieldName, java.lang.String sValue) throws BusinessObjectException
bo
- the business objectsFieldName
- the name of the field to setsValue
- the value to set, as a String
BusinessObjectException
- if the set method could not be invokedvoid setValues(BusinessObject bo, java.util.Map<java.lang.String,java.lang.String> fieldValueMap) throws BusinessObjectException
bo
- the business objectfieldValueMap
- the map that contains field value pairs where value is in String type
BusinessObjectException
- if the set method could not be invoked
java.lang.IllegalArgumentException
- if the business object or field name parameters are null
InvalidFieldException
- if the field is not a valid writable field for this business objectjava.lang.Object getUDFValueAsObject(BusinessObject bo, ObjectId typeObjectId, UDFDataType type) throws BusinessObjectException
bo
- the business objecttypeObjectId
- the UDFType object IDtype
- the type of UDF
BusinessObjectException
- if the get method could not be invokedjava.lang.String getUDFValue(BusinessObject bo, ObjectId typeObjectId, UDFDataType type) throws BusinessObjectException
bo
- the business objecttypeObjectId
- the UDFType object IDtype
- the type of UDF
BusinessObjectException
- if the get method could not be invokedvoid setUDFValue(BusinessObject bo, ObjectId typeObjectId, UDFDataType type, java.lang.String sValue) throws BusinessObjectException
bo
- the business objecttypeObjectId
- the UDFType object IDtype
- the type of UDFsValue
- the value to set, as a String
BusinessObjectException
- if the set method could not be invokedjava.lang.String getCodeValue(BusinessObject bo, ObjectId codeTypeObjectId) throws BusinessObjectException
bo
- the business objectcodeTypeObjectId
- the code type object ID
BusinessObjectException
- if the get method could not be invokedObjectId getCodeValueObjectId(BusinessObject bo, ObjectId codeTypeObjectId) throws BusinessObjectException
bo
- the business objectcodeTypeObjectId
- the code type object ID
BusinessObjectException
- if the get method could not be invokedvoid setCodeValueObjectId(BusinessObject bo, ObjectId codeTypeObjectId, ObjectId codeValueObjectId) throws BusinessObjectException
bo
- the business objectcodeTypeObjectId
- the code type object IDcodeValueObjectId
- the code value object ID
BusinessObjectException
- if the get method could not be invokedjava.util.Map<java.lang.String,java.util.List<java.lang.String>> getLoadAssociations()
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getDeleteAssociations()
java.lang.String[] getObjectIdFieldNames()
java.lang.String getClassNameFromObjectIdFieldName(java.lang.String objectIdFieldName)
objectIdFieldName
- the ObjectId field name
java.lang.String getDefaultParentClassName()
java.lang.String[] getAllParentClassNames()
java.lang.String[] getRequiredCreateFields()
java.lang.String[] getAllFields()
java.lang.String[] getWritableFields()
java.lang.String[] getMinimumXMLExportFields()
java.lang.String[] getFilterableFields()
java.lang.String[] getMainFields()
java.lang.Integer getMaxFieldLength(Session session, java.lang.String fieldName) throws BusinessObjectException
session
- the current sessionfieldName
- the name of the field
BusinessObjectException
- if there is trouble loading GlobalPreferencesT newBusinessObject(Session session)
session
- the current session
T newBusinessObject(Session session, ObjectId objectId) throws BusinessObjectException
session
- the current sessionobjectId
- the ObjectId of the business object
BusinessObjectException
- if the object could not be createdT newBusinessObject(Session session, java.util.Map<java.lang.String,java.lang.String> fieldValueMap) throws BusinessObjectException
session
- the current sessionfieldValueMap
- the map that contains field value pairs where value is in String type
BusinessObjectException
- if the object could not be createdT[] createBusinessObjectArray(int iSize)
iSize
- the size of the array
ObjectId[] create(Session session, java.util.List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
session
- the current sessionalObjects
- a list of objects to be created, all of this type
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsBOIterator<T> load(Session session, BusinessObject boParent, java.lang.String[] fields, java.lang.String sWhereClause, java.lang.String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
session
- the current sessionboParent
- the parent business objectfields
- the fields to loadsWhereClause
- the where clausesOrderBy
- the order by clause
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsBOIterator<T> load(Session session, java.lang.String[] fields, ObjectId[] objIds) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjIds
- object ids of the business objects
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsT load(Session session, java.lang.String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjId
- object id of the business object
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsvoid update(Session session, java.util.List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
session
- the current sessionalObjects
- a list of objects to update, all of this type
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsvoid delete(Session session, java.util.List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
session
- the current sessionalObjects
- a list of objects to delete, all of this type
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectsboolean hasFieldValue(BusinessObject bo, java.lang.String fieldName) throws InvalidFieldException, BusinessObjectException
bo
- the business objectfieldName
- the name of the field
InvalidFieldException
- if the field is not a valid field for this business object
BusinessObjectException
- if a problem occurred in the client-side business objectsvoid delete(Session session, java.util.List<? extends BusinessObject> alObjects, ObjectId replacementParent) throws ServerException, NetworkException, BusinessObjectException
session
- the current sessionalObjects
- a list of objects to delete, all of this typereplacementParent
- replacement parent object
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objects
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |