Package wt.fc

Class ReferenceFactory

java.lang.Object
wt.fc.ReferenceFactory
All Implemented Interfaces:
Externalizable, Serializable

public class ReferenceFactory extends Object implements Externalizable
A factory for getting references and strings that refer to persistable objects. Generally speaking, the factory returns version references when given the latest iteration of an Iterated object, otherwise object references. The version reference will always refer to the latest iteration of that version.

Supported API: true

Extendable: false
See Also:
  • Constructor Details

    • ReferenceFactory

      public ReferenceFactory()
      Constructor for ReferenceFactory.

      Supported API: true
  • Method Details

    • getReference

      public WTReference getReference(Persistable object) throws WTException
      Given an object, returns a reference to it. The type of the reference is based on the type of the object.

      Supported API: true
      Parameters:
      object -
      Returns:
      WTReference
      Throws:
      WTException
    • getReference

      public WTReference getReference(String stringReference) throws WTException
      Given a string reference that was originally created by the ReferenceFactory, returns a reference object that refers to the same object as the string. The type of the reference is based on the type of the string reference.

      Supported API: true
      Parameters:
      stringReference -
      Returns:
      WTReference
      Throws:
      WTException
    • getReferenceString

      public String getReferenceString(WTReference object) throws WTException
      Given an instance of some subclass of WTReference, returns a string representation of that reference.

      Supported API: true
      Parameters:
      object -
      Returns:
      String
      Throws:
      WTException
    • getReferenceString

      public String getReferenceString(Persistable object) throws WTException
      Given a persistable object, returns a string reference to that object.

      Supported API: true
      Parameters:
      object -
      Returns:
      String
      Throws:
      WTException