wt.fc
Class ReferenceFactory

java.lang.Object
  extended by 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:
Serialized Form

Constructor Summary
ReferenceFactory()
          Constructor for ReferenceFactory.
 
Method Summary
 WTReference getReference(Persistable object)
          Given an object, returns a reference to it.
 WTReference getReference(String stringReference)
          Given a string reference that was originally created by the ReferenceFactory, returns a reference object that refers to the same object as the string.
 String getReferenceString(Persistable object)
          Given a persistable object, returns a string reference to that object.
 String getReferenceString(WTReference object)
          Given an instance of some subclass of WTReference, returns a string representation of that reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceFactory

public ReferenceFactory()
Constructor for ReferenceFactory.

Supported API: true

Method Detail

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