Interface BOHelper<T extends BusinessObject>

All Known Implementing Classes:
ActivityCodeAssignmentHelper, ActivityCodeHelper, ActivityCodeTypeHelper, ActivityCodeUpdateHelper, ActivityCommentHelper, ActivityExpenseHelper, ActivityFilterHelper, ActivityHelper, ActivityNoteHelper, ActivityNoteUpdateHelper, ActivityOwnerHelper, ActivityPeriodActualHelper, ActivityRiskHelper, ActivityStepCreateHelper, ActivityStepDeleteHelper, ActivityStepHelper, ActivityStepTemplateHelper, ActivityStepTemplateItemHelper, ActivityStepUpdateHelper, ActivityUpdateHelper, AlertHelper, AutovueAttrHelper, BaselineProjectHelper, BaselineTypeHelper, com.primavera.integration.client.bo.BOHelperImpl, CalendarHelper, CBSDurationSummaryHelper, CBSHelper, ChangeSetHelper, CostAccountHelper, CurrencyHelper, DocumentCategoryHelper, DocumentHelper, DocumentStatusCodeHelper, EPSBudgetChangeLogHelper, EPSFundingHelper, EPSHelper, EPSNoteHelper, EPSSpendingPlanHelper, ExpenseCategoryHelper, FinancialPeriodHelper, FinancialPeriodTemplateHelper, FundingSourceHelper, GatewayDeploymentHelper, GlobalPreferencesHelper, GlobalProfileHelper, GlobalReplaceHelper, ImportOptionsTemplateHelper, IssueHistoryHelper, JobServiceHelper, LeanTaskHelper, LocationHelper, MSPTemplateHelper, NotebookTopicHelper, OBSHelper, OverheadCodeHelper, PAuditXHelper, ProfileHelper, ProjectBudgetChangeLogHelper, ProjectCodeAssignmentHelper, ProjectCodeHelper, ProjectCodeTypeHelper, ProjectDeploymentHelper, ProjectDocumentHelper, ProjectFundingHelper, ProjectHelper, ProjectIssueHelper, ProjectNoteHelper, ProjectPortfolioHelper, ProjectProfileHelper, ProjectResourceCategoryHelper, ProjectResourceHelper, ProjectResourceQuantityHelper, ProjectSpendingPlanHelper, ProjectThresholdHelper, RelationshipHelper, ResourceAccessHelper, ResourceAssignmentCodeAssignmentHelper, ResourceAssignmentCodeHelper, ResourceAssignmentCodeTypeHelper, ResourceAssignmentCreateHelper, ResourceAssignmentHelper, ResourceAssignmentPeriodActualHelper, ResourceAssignmentUpdateHelper, ResourceCodeAssignmentHelper, ResourceCodeHelper, ResourceCodeTypeHelper, ResourceCurveHelper, ResourceHelper, ResourceHourHelper, ResourceLocationHelper, ResourceRateHelper, ResourceRoleHelper, ResourceTeamHelper, RiskCategoryHelper, RiskHelper, RiskImpactHelper, RiskMatrixHelper, RiskMatrixScoreHelper, RiskMatrixThresholdHelper, RiskResponseActionHelper, RiskResponseActionImpactHelper, RiskResponsePlanHelper, RiskThresholdHelper, RiskThresholdLevelHelper, RoleCodeAssignmentHelper, RoleCodeHelper, RoleCodeTypeHelper, RoleHelper, RoleLimitHelper, RoleRateHelper, RoleTeamHelper, ScheduleCheckOptionHelper, ScheduleOptionsHelper, ShiftHelper, ShiftPeriodHelper, StepUserDefinedValueUpdateHelper, ThresholdParameterHelper, TimesheetAuditHelper, TimesheetDelegateHelper, TimesheetHelper, TimesheetPeriodHelper, UDFCodeHelper, UDFTypeHelper, UDFValueHelper, UnitOfMeasureHelper, UpdateBaselineOptionHelper, UserConsentHelper, UserDefinedValueUpdateHelper, UserFieldTitleHelper, UserHelper, UserInterfaceViewHelper, UserLicenseHelper, UserOBSHelper, WBSCategoryHelper, WBSHelper, WBSMilestoneHelper, WbsReviewersHelper

public interface BOHelper<T extends BusinessObject>
Interface to business object helper classes used to simplify access to business objects exposed in the API.
  • Method Details

    • getClassName

      String getClassName()
      Gets the name of the business object class.
      Returns:
      String the name of the business object class
    • getPluralName

      String getPluralName()
      Gets the plural name of the business object class.
      Returns:
      String the plural name of the business object class
    • isField

      boolean isField(String sName)
      Indicates whether the given field is a valid field for this business object class.
      Parameters:
      sName - the name of the field
      Returns:
      boolean true if the field is a valid field name for this class
    • isWritableField

      boolean isWritableField(String sName)
      Indicates whether the given field is a writable field in this business object class.
      Parameters:
      sName - the name of the field
      Returns:
      boolean true if the field is writable in this class
    • isScriptableField

      boolean isScriptableField(String sName)
      Indicates whether the given field is a scriptable field in this business object class. Only scriptable fields can be used with setValue(..) and getValue() methods
      Parameters:
      sName - the name of the field
      Returns:
      boolean true if the field is scriptable in this class
    • getFieldType

      int getFieldType(String sFieldName) throws InvalidFieldException
      Gets the type of a given field in the business object class.
      Parameters:
      sFieldName - the name of a field in the class
      Returns:
      int the field type
      Throws:
      InvalidFieldException - if the specified field name is not valid
    • isFilterableField

      boolean isFilterableField(String sName)
      Indicates whether the given field is a filterable field in this business object class.
      Parameters:
      sName - the name of the field
      Returns:
      boolean true if the field is filterable in this class
    • getKeyFields

      String[] getKeyFields()
      Gets the key field names used for this class. Business objects with one key will always return "ObjectId".
      Returns:
      String[] the key fields
    • isAssociatedClass

      boolean isAssociatedClass(String sName)
      Indicates whether the given class has an association to this business object class.
      Parameters:
      sName - the name of the class
      Returns:
      boolean true if the class is associated with this class
    • isGlobal

      boolean isGlobal()
      Indicates whether the business object class is global and therefore accessible from the GlobalObjectManager.
      Returns:
      boolean true if the business object class is global
    • canCreate

      boolean canCreate()
      Indicates whether this type of business object class has create methods.
      Returns:
      boolean true if the business object can be created in the server
    • canUpdate

      boolean canUpdate()
      Indicates whether this type of business object class has update methods.
      Returns:
      boolean true if the business object can be updated on the server
    • canDelete

      boolean canDelete()
      Indicates whether this type of business object class has delete methods.
      Returns:
      boolean true if the business object can be deleted from the server
    • hasMultiPartKey

      boolean hasMultiPartKey()
      Indicates whether this type of business object has a multi-part ObjectId.
      Returns:
      boolean true if the business object has a multi-part ObjectId
    • isHierarchical

      boolean isHierarchical()
      Indicates whether this type of business object is hierarchical.
      Returns:
      boolean true if the business object is hierarchical
    • isSingular

      boolean isSingular()
      Indicates whether this type of business object is singular (one and only one instance exists in the database).
      Returns:
      boolean true if the business object is singular
    • supportsLiveSpreads

      boolean supportsLiveSpreads()
      Indicates whether this type of business object supports live spread data.
      Returns:
      boolean true if the business object supports live spread data
    • supportsSummarizedSreads

      boolean supportsSummarizedSreads()
      Indicates whether this type of business object supports summarized spread data.
      Returns:
      boolean true if the business object supports summarized spread data
    • supportsUDF

      boolean supportsUDF()
      Indicates whether this type of business object supports user-defined fields (UDFs).
      Returns:
      boolean true if the business object supports UDFs
    • supportsUDFCode

      boolean supportsUDFCode()
      Indicates whether this type of business object supports UDFCode.
      Returns:
      boolean true if the business object supports UDFCode
    • supportsCodes

      boolean supportsCodes()
      Indicates whether this type of business object supports codes.
      Returns:
      boolean true if the business object supports codes
    • getValueAsObject

      Object getValueAsObject(BusinessObject bo, String sFieldName) throws BusinessObjectException
      Gets the value as an Object of a particular field that was loaded for the given business object. Fields of type boolean, double, and int are returned as Boolean, Double, and Integer, respectively.
      Parameters:
      bo - the business object
      sFieldName - the name of the field
      Returns:
      Object the value of the field
      Throws:
      BusinessObjectException - if the get method could not be invoked
    • getValue

      String getValue(BusinessObject bo, String sFieldName) throws BusinessObjectException
      Gets the value as a String of a particular field that was loaded for the given business object. The format of the returned string corresponds to the format used when exporting this field to XML.
      Parameters:
      bo - the business object
      sFieldName - the name of the field
      Returns:
      String a string representation of the value
      Throws:
      BusinessObjectException - if the get method could not be invoked
    • setValue

      void setValue(BusinessObject bo, String sFieldName, String sValue) throws BusinessObjectException
      Sets the value of a particular field for the given business object.
      Parameters:
      bo - the business object
      sFieldName - the name of the field to set
      sValue - the value to set, as a String
      Throws:
      BusinessObjectException - if the set method could not be invoked
    • setValues

      void setValues(BusinessObject bo, Map<String,String> fieldValueMap) throws BusinessObjectException
      Sets field values (from a map) for the given business object
      Parameters:
      bo - the business object
      fieldValueMap - the map that contains field value pairs where value is in String type
      Throws:
      BusinessObjectException - if the set method could not be invoked
      IllegalArgumentException - if the business object or field name parameters are null
      InvalidFieldException - if the field is not a valid writable field for this business object
    • getLoadAssociations

      Map<String,List<String>> getLoadAssociations()
      Gets a map of load associations that this business object has to other business objects. The keys are String class names to which a load association exists. The values are Lists of all load association method names to that particular class.
      Returns:
      Map a map of load association names
    • getDeleteAssociations

      Map<String,List<String>> getDeleteAssociations()
      Gets a map of delete associations that this business object has to other business objects. The keys are String class names to which a delete association exists. The values are Lists of all delete association method names to that particular class.
      Returns:
      Map a map of delete association names
    • getObjectIdFieldNames

      String[] getObjectIdFieldNames()
      Gets an array of ObjectId field names that exist as fields in this business object class. This array does not include the field named "ObjectId"
      Returns:
      String[] an array of ObjectId field names
    • getClassNameFromObjectIdFieldName

      String getClassNameFromObjectIdFieldName(String objectIdFieldName)
      Gets the class name from an ObjectId field name. For example, in the Activity class, PrimaryResourceObjectId is an ObjectId field name, but the class name is Resource.
      Parameters:
      objectIdFieldName - the ObjectId field name
      Returns:
      String the class name for the ObjectId field name; null if not valid
    • getDefaultParentClassName

      String getDefaultParentClassName()
      Gets the name of the parent class that is most commonly used for loading this type of business object.
      Returns:
      String the parent class name
    • getAllParentClassNames

      String[] getAllParentClassNames()
      Gets the class names of all parents that can be used to load this business object using a where clause.
      Returns:
      String[] an array of parent class names
    • getRequiredCreateFields

      String[] getRequiredCreateFields()
      Gets all fields that are filterable.
      Returns:
      String[] an array of filterable fields
    • getAllFields

      String[] getAllFields()
      Gets all non-code and non-UDF fields for this business object
      Returns:
      String[] an array of all non-code and non-UDF fields
    • getWritableFields

      String[] getWritableFields()
      Gets all writable non-code and non-UDF fields for this business object
      Returns:
      String[] an array of all writable non-code and non-UDF fields
    • getMinimumXMLExportFields

      String[] getMinimumXMLExportFields()
      Gets all fields that are always exported at a minimum by the new flat XML exporter
      Returns:
      String[] an array of exported fields
    • getFilterableFields

      String[] getFilterableFields()
      Gets all non-code and non-UDF fields for this business object.
      Returns:
      String[] an array of all non-code fields
    • getMainFields

      String[] getMainFields()
      Gets all fields that are not code, UDF, or summary fields. Code types assigned and UDF types assigned fields are also not included.
      Returns:
      String[] an array of all non-code fields
    • getMaxFieldLength

      Integer getMaxFieldLength(Session session, String fieldName) throws BusinessObjectException
      Retrieves the field length limit for string type field.
      Parameters:
      session - the current session
      fieldName - the name of the field
      Returns:
      Integer maximum field length for string type field. null means no limit.
      Throws:
      BusinessObjectException - if there is trouble loading GlobalPreferences
    • newBusinessObject

      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.
      Parameters:
      session - the current session
      Returns:
      BusinessObject a client-side business object
    • newBusinessObject

      T newBusinessObject(Session session, ObjectId objectId) throws BusinessObjectException
      Creates a new client-side instance of this type of business object and sets its unique ID.
      Parameters:
      session - the current session
      objectId - the ObjectId of the business object
      Returns:
      BusinessObject a client-side business object
      Throws:
      BusinessObjectException - if the object could not be created
    • newBusinessObject

      T newBusinessObject(Session session, Map<String,String> fieldValueMap) throws BusinessObjectException
      Creates a new client-side instance of this type of business object and sets its field values from a map
      Parameters:
      session - the current session
      fieldValueMap - the map that contains field value pairs where value is in String type
      Returns:
      T a client-side business object
      Throws:
      BusinessObjectException - if the object could not be created
    • createBusinessObjectArray

      T[] createBusinessObjectArray(int iSize)
      Creates an array of a particular business object type. The returned array is of the specified size, but each index contains null.
      Parameters:
      iSize - the size of the array
      Returns:
      BusinessObject[] a business object array, initialized to this specific type
    • create

      ObjectId[] create(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Creates multiple business objects of this type in the database.
      Parameters:
      session - the current session
      alObjects - a list of objects to be created, all of this type
      Returns:
      ObjectId[] the array of unique IDs of newly created business objects
      Throws:
      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
    • load

      BOIterator<T> load(Session session, BusinessObject boParent, String[] fields, String sWhereClause, String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
      Loads business objects of this type from a given parent.
      Parameters:
      session - the current session
      boParent - the parent business object
      fields - the fields to load
      sWhereClause - the where clause
      sOrderBy - the order by clause
      Returns:
      BOIterator a business object iterator used to get the results of the load request
      Throws:
      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
    • load

      Loads multiple business objects of this type by ObjectId.
      Parameters:
      session - the Session object
      fields - fields to load
      objIds - object ids of the business objects
      Returns:
      BOIterator a business object iterator used to get the results of the load request
      Throws:
      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
    • load

      Loads a business object of this type by ObjectId.
      Parameters:
      session - the Session object
      fields - fields to load
      objId - object id of the business object
      Returns:
      BusinessObject business object of the type
      Throws:
      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
    • update

      void update(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Updates business objects of this type.
      Parameters:
      session - the current session
      alObjects - a list of objects to update, all of this type
      Throws:
      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
    • delete

      void delete(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Deletes business objects of this type.
      Parameters:
      session - the current session
      alObjects - a list of objects to delete, all of this type
      Throws:
      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
    • hasFieldValue

      boolean hasFieldValue(BusinessObject bo, String fieldName) throws InvalidFieldException, BusinessObjectException
      Checks if the business object has a value for the specified field
      Parameters:
      bo - the business object
      fieldName - the name of the field
      Throws:
      InvalidFieldException - if the field is not a valid field for this business object
      BusinessObjectException - if a problem occurred in the client-side business objects
    • delete

      void delete(Session session, List<? extends BusinessObject> alObjects, ObjectId replacementParent) throws ServerException, NetworkException, BusinessObjectException
      Deletes business objects of this type, specifying a replacement parent
      Parameters:
      session - the current session
      alObjects - a list of objects to delete, all of this type
      replacementParent - replacement parent object
      Throws:
      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