Class BODeleteHelper

java.lang.Object
com.primavera.integration.util.BODeleteHelper

public class BODeleteHelper extends Object
This helper class is used to delete multiple business objects from the database in the ideal order. Business objects are deleted in the opposite order from which they were added to this object, i.e., the last objects added will be the first objects deleted.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Class constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds an object to eventually be deleted from the database
    void
    Adds multiple objects to eventually be deleted from the database
    void
    add(String sBOType, ObjectId objId)
    Adds an ObjectId for a particular business object type to eventually be deleted from the database
    void
    add(String sBOType, ObjectId[] objIds)
    Adds multiple ObjectIds for a particular business object type to eventually be deleted from the database
    void
    delete(Session session, String sBOType)
    Deletes from the database all the business objects of a particular type that were added to this object.
    void
    deleteAll(Session session)
    Deletes from the database all the business objects that were added to this object
    void
    Clears all the objects added without deleting any objects from the database.
    Returns a string representation of the object, listing counts of object types currently contained.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BODeleteHelper

      public BODeleteHelper()
      Class constructor
  • Method Details

    • add

      public void add(String sBOType, ObjectId objId)
      Adds an ObjectId for a particular business object type to eventually be deleted from the database
      Parameters:
      sBOType - the business object type
      objId - the related ObjectId
      Throws:
      IllegalArgumentException - if a parameter is null
    • add

      public void add(String sBOType, ObjectId[] objIds)
      Adds multiple ObjectIds for a particular business object type to eventually be deleted from the database
      Parameters:
      sBOType - the business object type
      objIds - the related ObjectIds
      Throws:
      IllegalArgumentException - if a parameter is null
    • add

      public void add(BusinessObject bo)
      Adds an object to eventually be deleted from the database
      Parameters:
      bo - the business object
    • add

      public void add(BusinessObject[] bos)
      Adds multiple objects to eventually be deleted from the database
      Parameters:
      bos - the business objects
    • reset

      public void reset()
      Clears all the objects added without deleting any objects from the database.
    • toString

      public String toString()
      Returns a string representation of the object, listing counts of object types currently contained.
      Overrides:
      toString in class Object
      Returns:
      String a string representation of the object.
    • deleteAll

      public void deleteAll(Session session)
      Deletes from the database all the business objects that were added to this object
      Parameters:
      session - the Session object
    • delete

      public void delete(Session session, String sBOType) throws ServerException, NetworkException, BusinessObjectException
      Deletes from the database all the business objects of a particular type that were added to this object. Business objects are deleted in the opposite order from which they were added to this object, i.e., the last objects added will be the first
      Parameters:
      session - the Session object
      sBOType - the business object type
      Throws:
      ServerException - if a problem occurred on the server-side
      NetworkException - if a problem occurred in the network layer
      BusinessObjectException - if the type is invalid or may not be deleted
      IllegalArgumentException - if a parameter is null