Package wt.fc

Class ObjectIdentifier

All Implemented Interfaces:
Externalizable, Serializable, wt.fc._NetFactor, wt.fc._ObjectMappable, wt.fc._QueryKey, NetFactor, ObjectMappable, QueryKey, Evolvable

@GenAsObjectMappable(interfaces=QueryKey.class, serializable=EVOLVABLE, versions=7335526960071533094L, properties=@GeneratedProperty(name="id",type=long.class,supportedAPI=PUBLIC_PRIVATE,javaDoc="The unique identifier of this <code>ObjectIdentifier</code>.",accessors=@PropertyAccessors(setExceptions={}))) public final class ObjectIdentifier extends _ObjectIdentifier
ObjectIdentifier represents a unique identifier assigned to the object by the PersistenceManager when it saves a Persistable object to a datastore.

Use the newObjectIdentifier static factory method(s), not the ObjectIdentifier constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Constructor Details

    • ObjectIdentifier

      public ObjectIdentifier()


      Supported API: true
  • Method Details

    • toString

      public String toString()
      Returns the conceptual (modeled) name for the class.

      Supported API: true
      Overrides:
      toString in class _ObjectIdentifier
      Returns:
      String
    • newObjectIdentifier

      public static ObjectIdentifier newObjectIdentifier(Class aClass, long anIdValue) throws WTException


      Supported API: true
      Parameters:
      aClass - type of the object
      anIdValue - unique persistence identifier of the object
      Returns:
      ObjectIdentifier
      Throws:
      WTException
    • newObjectIdentifier

      public static ObjectIdentifier newObjectIdentifier(String aClassName, long anIdValue) throws WTException


      Supported API: true
      Parameters:
      aClassName - type of the object
      anIdValue - unique persistence identifier of the object
      Returns:
      ObjectIdentifier
      Throws:
      WTException
    • newObjectIdentifier

      public static ObjectIdentifier newObjectIdentifier(String url) throws WTException


      Supported API: true
      Parameters:
      url - String representation of the identifier in the format classname:id
      Returns:
      ObjectIdentifier
      Throws:
      WTException
    • equals

      public boolean equals(Object obj)
      Compare two ObjectIdentifier objects for equality.

      Supported API: true
      Specified by:
      equals in interface QueryKey
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object to compare.
      Returns:
      boolean
    • hashCode

      public int hashCode()
      Returns a hash code for this ObjectIdentifier.

      Supported API: true
      Specified by:
      hashCode in interface QueryKey
      Overrides:
      hashCode in class Object
      Returns:
      int
    • getStringValue

      public String getStringValue()
      Returns a string representation for this ObjectIdentifier. This can be used to pass the ObjectIdentifier as a String value (such as on a URL parameter).

      Supported API: true
      Returns:
      String
    • idAsString

      public String idAsString()
      Returns a string representation for this ObjectIdentifier.getId.

      Supported API: true
      Returns:
      String
    • isAssigned

      public boolean isAssigned()
      Return true if this ObjectIdentifier has been assigned for a Persistable object.

      Supported API: true
      Returns:
      boolean
    • isNotAssigned

      public boolean isNotAssigned()
      Return true if this ObjectIdentifier has NOT been assigned to any Persistable object.

      Supported API: true
      Returns:
      boolean
    • appendKeyCriteria

      public QuerySpec appendKeyCriteria(QuerySpec qs) throws WTException


      Supported API: true
      Parameters:
      qs -
      Returns:
      QuerySpec
      Throws:
      WTException
    • initialize

      protected void initialize()


      Supported API: true