com.xavax.xstore
Class AssociationMap

Object
  extended byPersistenceMap
      extended byAssociationMap

public class AssociationMap
extends PersistenceMap

AssociationMap encapsulates the metadata that describes an association between two classes and includes methods to manage associations. The metadata includes the association name, multiplicity (1:1 or 1:n), the destination ClassMap, and ColumnMaps for the source OID, sequence, and destination LOID. Other metadata such as the collection class for 1:n associations, the Field for the source reference, and the destination constructor are determined using reflection at initialization time.


Method Summary
 ClassMap classMap()
          Returns the ClassMap for the class to which this association belongs.
 boolean dependent()
          Returns true if the destination objects are dependent on the source object.
 ColumnMap destinationClass()
          Returns the ColumnMap for the column to which the destination class ID is mapped.
 ColumnMap destinationDB()
          Returns the ColumnMap for the column to which the destination database ID is mapped.
 ColumnMap destinationOID()
          Returns the ColumnMap for the column to which the destination OID is mapped.
 boolean multiplicity()
          Returns true if this is a 1:n (one-to-many) association.
 void outputXML(PrintWriter out)
          Output an XML representation of this attribute on the specified print writer.
 ColumnMap sequence()
          Returns the ColumnMap for the column to which the sequence number is mapped.
 void show()
          Output a description of this attribute on stdout.
 ColumnMap sourceOID()
          Returns the ColumnMap for the column to which the source OID is mapped.
 TableMap table()
          Returns the TableMap for the table used to store a 1:n association.
 
Methods inherited from class PersistenceMap
hashCode, manager, name, toString
 
Methods inherited from class Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

show

public void show()
Output a description of this attribute on stdout.


outputXML

public void outputXML(PrintWriter out)
Output an XML representation of this attribute on the specified print writer.

Parameters:
out - the print writer to use for all output.

dependent

public boolean dependent()
Returns true if the destination objects are dependent on the source object. In a future release, destination objects will be deleted automatically when the source object is deleted.

Returns:
true if the destination objects are dependent.

multiplicity

public boolean multiplicity()
Returns true if this is a 1:n (one-to-many) association.

Returns:
true if this is a 1:n (one-to-many) association.

classMap

public ClassMap classMap()
Returns the ClassMap for the class to which this association belongs.

Returns:
the ClassMap for the class to which this association belongs.

table

public TableMap table()
Returns the TableMap for the table used to store a 1:n association.

Returns:
the TableMap for the table used to store a 1:n association.

destinationDB

public ColumnMap destinationDB()
Returns the ColumnMap for the column to which the destination database ID is mapped.

Returns:
the ColumnMap for the destination DB.

destinationClass

public ColumnMap destinationClass()
Returns the ColumnMap for the column to which the destination class ID is mapped.

Returns:
the ColumnMap for the destination class ID.

destinationOID

public ColumnMap destinationOID()
Returns the ColumnMap for the column to which the destination OID is mapped.

Returns:
the ColumnMap for the destination OID.

sourceOID

public ColumnMap sourceOID()
Returns the ColumnMap for the column to which the source OID is mapped.

Returns:
the ColumnMap for the source OID.

sequence

public ColumnMap sequence()
Returns the ColumnMap for the column to which the sequence number is mapped.

Returns:
the ColumnMap for the sequence number.