Class ProjectCodeHelper

java.lang.Object
com.primavera.integration.client.BOHelperBase
com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
com.primavera.integration.client.bo.helper.ProjectCodeHelper
All Implemented Interfaces:
BOHelper<ProjectCode>, com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>

public class ProjectCodeHelper extends com.primavera.integration.client.bo.BOHelperImpl<ProjectCode> implements com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>
Business object helper class used to simplify access to ProjectCode objects.
  • Method Details

    • getRequiredCreateFields

      public String[] getRequiredCreateFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all fields that must be set before calling create() on this type of business object. Generally the array will contain one field in each position, but if this business object requires either one field or another field to be set, both of those fields will appear in an element of the returned array separated by '|'. For example, if this business object requires field A to always be set, and field B or field C to be set, one element in the returned array will contain A, and one element will contain B|C.
      Specified by:
      getRequiredCreateFields in interface BOHelper<ProjectCode>
      Specified by:
      getRequiredCreateFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of required create fields
    • getAllFields

      public String[] getAllFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all non-code and non-UDF fields for this business object
      Specified by:
      getAllFields in interface BOHelper<ProjectCode>
      Specified by:
      getAllFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of all non-code and non-UDF fields
    • getFilterableFields

      public String[] getFilterableFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all fields that are filterable.
      Specified by:
      getFilterableFields in interface BOHelper<ProjectCode>
      Specified by:
      getFilterableFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of filterable fields
    • getWritableFields

      public String[] getWritableFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all writable non-code and non-UDF fields for this business object
      Specified by:
      getWritableFields in interface BOHelper<ProjectCode>
      Specified by:
      getWritableFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of all writable non-code and non-UDF fields
    • getInternalDefaultLoadFields

      public String[] getInternalDefaultLoadFields()
      An internal method that should not be called directly by client code.
      Specified by:
      getInternalDefaultLoadFields in interface com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>
      Specified by:
      getInternalDefaultLoadFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an internal array
    • getMinimumXMLExportFields

      public String[] getMinimumXMLExportFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all fields that are always exported at a minimum by the new flat XML exporter
      Specified by:
      getMinimumXMLExportFields in interface BOHelper<ProjectCode>
      Specified by:
      getMinimumXMLExportFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of exported fields
    • getMainFields

      public String[] getMainFields()
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Gets all fields that are not code, UDF, or summary fields. Code types assigned and UDF types assigned fields are also not included.
      Specified by:
      getMainFields in interface BOHelper<ProjectCode>
      Specified by:
      getMainFields in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Returns:
      String[] an array of all non-code fields
    • newBusinessObject

      public ProjectCode newBusinessObject(Session session)
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Creates a new client-side instance of this type of business object; call create() on the object to add it to the database.
      Specified by:
      newBusinessObject in interface BOHelper<ProjectCode>
      Specified by:
      newBusinessObject in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Parameters:
      session - the current session
      Returns:
      BusinessObject a client-side business object
    • newBusinessObject

      public ProjectCode newBusinessObject(Session session, ObjectId objectId) throws BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Creates a new client-side instance of this type of business object and sets its unique ID
      Specified by:
      newBusinessObject in interface BOHelper<ProjectCode>
      Specified by:
      newBusinessObject in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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
    • createBusinessObjectArray

      public ProjectCode[] createBusinessObjectArray(int iSize)
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Creates an array of a particular business object type. The returned array is of the specified size, but each index contains null.
      Specified by:
      createBusinessObjectArray in interface BOHelper<ProjectCode>
      Specified by:
      createBusinessObjectArray in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Parameters:
      iSize - the size of the array
      Returns:
      BusinessObject[] a business object array, initialized to this specific type
    • load

      public BOIterator<ProjectCode> load(Session session, String[] fields, String sWhereClause, String sOrderBy, com.primavera.bo.common.PRequestOptions options, com.primavera.bo.base.RemoteTXId txId) throws ServerException, NetworkException, BusinessObjectException
      An internal load method that should not be called directly from client code.
      Specified by:
      load in interface com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>
      Parameters:
      session - the Session object
      fields - fields to load
      sWhereClause - the where clause
      sOrderBy - the order by clause
      options - an internal parameter
      txId - an internal key
      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

      public BOIterator<ProjectCode> load(Session session, String[] fields, ObjectId[] objIds, com.primavera.bo.common.PRequestOptions options, com.primavera.bo.base.RemoteTXId txId) throws ServerException, NetworkException, BusinessObjectException
      An internal load method that should not be called directly from client code.
      Specified by:
      load in interface com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>
      Parameters:
      session - the Session object
      fields - fields to load
      objIds - object ids of the business objects
      options - an internal parameter
      txId - an internal key
      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
    • create

      public ObjectId[] create(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Creates multiple business objects of this type in the database
      Specified by:
      create in interface BOHelper<ProjectCode>
      Specified by:
      create in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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

      public BOIterator<ProjectCode> load(Session session, BusinessObject boParent, String[] fields, String sWhereClause, String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Loads business objects of this type from a given parent
      Specified by:
      load in interface BOHelper<ProjectCode>
      Specified by:
      load in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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

      public BOIterator<ProjectCode> load(Session session, BusinessObject boParent, String[] fields, String sWhereClause, String sOrderBy, com.primavera.bo.common.PRequestOptions options, com.primavera.bo.base.RemoteTXId txId) throws ServerException, NetworkException, BusinessObjectException
      An internal load method that should not be called directly from client code.
      Specified by:
      load in interface com.primavera.integration.client.bo.InternalBOHelper<ProjectCode>
      Parameters:
      session - the current session
      boParent - the parent business object
      fields - the fields to load
      sWhereClause - the where clause
      sOrderBy - the order by clause
      txId - an internal key
      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

      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Loads multiple business objects of this type by ObjectId
      Specified by:
      load in interface BOHelper<ProjectCode>
      Specified by:
      load in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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

      public ProjectCode load(Session session, String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Loads a business object of this type by ObjectId.
      Specified by:
      load in interface BOHelper<ProjectCode>
      Specified by:
      load in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      Parameters:
      session - the Session object
      fields - fields to load
      objId - object ids of the business object
      Returns:
      T business 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
    • update

      public void update(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Updates business objects of this type
      Specified by:
      update in interface BOHelper<ProjectCode>
      Specified by:
      update in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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

      public void delete(Session session, List<? extends BusinessObject> alObjects) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Deletes business objects of this type
      Specified by:
      delete in interface BOHelper<ProjectCode>
      Specified by:
      delete in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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
    • delete

      public void delete(Session session, List<? extends BusinessObject> alObjects, ObjectId replacementParent) throws ServerException, NetworkException, BusinessObjectException
      Description copied from class: com.primavera.integration.client.bo.BOHelperImpl
      Deletes business objects of this type, specifying a replacement parent
      Specified by:
      delete in interface BOHelper<ProjectCode>
      Specified by:
      delete in class com.primavera.integration.client.bo.BOHelperImpl<ProjectCode>
      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