Package wt.fc

Class PersistenceHelper

java.lang.Object
wt.fc.PersistenceHelper
All Implemented Interfaces:
Serializable

public class PersistenceHelper extends Object implements Serializable
The class contains utility methods associated with the PersistenceManager.

Supported API: true

Extendable: false
See Also:
  • Field Details

  • Method Details

    • getCreateStamp

      public static Timestamp getCreateStamp(Persistable obj)
      Retrives the create timestamp for the given Persistable object.

      Supported API: true
      Parameters:
      obj -
      Returns:
      Timestamp
    • getModifyStamp

      public static Timestamp getModifyStamp(Persistable obj)
      Retrives the modify timestamp for the given Persistable object.

      Supported API: true
      Parameters:
      obj -
      Returns:
      Timestamp
    • getObjectIdentifier

      public static ObjectIdentifier getObjectIdentifier(Persistable obj)
      Retrives the object identifier for the given Persistable object.

      Supported API: true
      Parameters:
      obj -
      Returns:
      ObjectIdentifier
    • isDeleted

      public static boolean isDeleted(Persistable obj)
      Returns true if the specified persistable object is marked as deleted.

      Supported API: true
      Parameters:
      obj -
      Returns:
      boolean
    • isEquivalent

      public static boolean isEquivalent(Persistable obj1, Persistable obj2)
      Returns true if the two given objects are equivalent persistable object. Two objects are equivalent if they are Persistable and their ObjectIdentifiers are equal.

      Supported API: true
      Parameters:
      obj1 -
      obj2 -
      Returns:
      boolean
    • isPersistent

      public static boolean isPersistent(Persistable obj)
      Returns true if the given Persistable object is saved in the datastore.

      Supported API: true
      Parameters:
      obj -
      Returns:
      boolean
    • isPersistent

      public static boolean isPersistent(Object obj)
      Returns true if the given object is Peristable and has already been saved in the database.

      Supported API: true
      Parameters:
      obj -
      Returns:
      boolean
    • buildForeignKeyNavigateSpec

      public static NavigateSpec buildForeignKeyNavigateSpec(Object source, String role, Class linkClass, boolean onlyOtherSide) throws WTException
      This method builds a query specification for navigating a ForeignKey association.

      Supported API: true
      Parameters:
      source - The source of the navigate operation. This argument can be a single Persistable object or a WTCollection of Persistable objects.
      role - The role to navigate to.
      linkClass - The association link class to navigate.
      onlyOtherSide - Indicates that only the other side objects of the association should be returned. If false, then the link objects are returned (the other side object can be obtained via the link object's getter method).
      Returns:
      NavigateSpec
      Throws:
      WTException
    • buildNavigateSpec

      public static NavigateSpec buildNavigateSpec(Object source, String role, Class linkClass, boolean onlyOtherSide) throws WTException
      This method builds a query specification for navigating an association.

      Supported API: true
      Parameters:
      source - The source of the navigate operation. This argument can be a single Persistable object or a WTCollection of Persistable objects.
      role - The role to navigate to.
      linkClass - The association link class to navigate.
      onlyOtherSide - Indicates that only the other side objects of the association should be returned. If false, then the link objects are returned (the other side object can be obtained via the link object's getter method).
      Returns:
      NavigateSpec
      Throws:
      WTException