wt.fc
Interface WTReference

All Superinterfaces:
NetFactor, ObjectMappable, Serializable
All Known Subinterfaces:
RefreshHelper.RoleReference
All Known Implementing Classes:
DataOccurrenceReference, ObjectReference, PersistentReference, RefreshHelper.RoleObjectReference, RefreshHelper.RoleVersionReference, UsesOccurrenceReference, VersionReference

public interface WTReference
extends ObjectMappable

Interface that defines the basic notion of holding a reference to a Persistable object. The form of the reference is defined via a QueryKey.

Supported API: true

Extendable: true


Field Summary
static String KEY
          Label for the attribute.
static String OBJECT
          Label for the attribute.
 
Method Summary
 boolean equals(Object obj)
          Tests if two references refer to the same object.
 QueryKey getKey()
          Gets the object for the association that plays role: KEY.
 Persistable getObject()
          Gets the object for the association that plays role: OBJECT.
 Class getReferencedClass()
          Returns the class that this reference refers to.
 int hashCode()
          

Supported API: false
 boolean references(Persistable obj)
          Tests if this reference refers to the Persistable object passed in.
 void refresh()
          Retreives the referenced object from the database

Supported API: false
 void setKey(QueryKey a_Key)
          Sets the object for the association that plays role: KEY.
 
Methods inherited from interface wt.fc.ObjectMappable
readExternal, writeExternal
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo, getConceptualClassname
 

Field Detail

OBJECT

public static final String OBJECT
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

KEY

public static final String KEY
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

getObject

public Persistable getObject()
                      throws WTRuntimeException
Gets the object for the association that plays role: OBJECT.

Supported API: false

Returns:
Persistable
Throws:
WTRuntimeException

getKey

public QueryKey getKey()
Gets the object for the association that plays role: KEY.

Supported API: false

Returns:
QueryKey

setKey

public void setKey(QueryKey a_Key)
Sets the object for the association that plays role: KEY.

Supported API: false

Parameters:
a_Key -

equals

public boolean equals(Object obj)
Tests if two references refer to the same object.

Supported API: false

Parameters:
obj -
Returns:
true if both references refer to the same object, otherwise false.

hashCode

public int hashCode()


Supported API: false

Returns:
int

refresh

public void refresh()
             throws WTException
Retreives the referenced object from the database

Supported API: false

Throws:
WTException

references

public boolean references(Persistable obj)
Tests if this reference refers to the Persistable object passed in.

Supported API: false

Parameters:
obj -
Returns:
true if this reference refers to the Persistable object passed in, otherwise false.

getReferencedClass

public Class getReferencedClass()
Returns the class that this reference refers to. This method does not retreive the referenced object from the database.

Supported API: false

Returns:
Class