com.xavax.xstore
Class ClassMap

Object
  extended byPersistenceMap
      extended byClassMap

public class ClassMap
extends PersistenceMap

ClassMap encapsulates the metadata required to persist a class and performs the actual persistence operations using pools of prepared statements created for the class. The metadata includes the names of the interface, proxy class, and implementation class; the table name and column names for the key fields; and collections of AttributeMaps and AssociationMaps.


Method Summary
 String basename()
          Returns the name of this class minus the package name.
 boolean checkDatabase(DatabaseMap dmap)
          Returns true if the specified database supports this class.
 short classID()
          Returns the class identifier for this class.
 AssociationMap findAssociation(String name)
          Returns the association with the specified name belonging to this class.
 AttributeMap findAttribute(String name)
          Returns the attribute with the specified name belonging to this class.
 String implementationName()
          Returns the name of the implementation class for this class.
 ColumnMap keyOID()
          Returns the column map for the column to which the OID is mapped.
 String name()
          Returns the name of this class.
 void outputXML(PrintWriter out)
          Output an XML representation of this class on the specified print writer.
 ClassMap parent()
          Returns the class map for the parent of this class.
 String proxyName()
          Returns the name of the proxy class for this class.
 void show()
          Output a description of this class on stdout.
 TableMap table()
          Returns the table map for the table to which this class is mapped.
 Iterator tables()
          Returns the vector of tables used by this class.
 
Methods inherited from class PersistenceMap
hashCode, manager, toString
 
Methods inherited from class Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

checkDatabase

public boolean checkDatabase(DatabaseMap dmap)
Returns true if the specified database supports this class.

Returns:
true if the specified database supports this class.

findAssociation

public AssociationMap findAssociation(String name)
Returns the association with the specified name belonging to this class.

Parameters:
name - the association name.
Returns:
the association map matching the specified name.

findAttribute

public AttributeMap findAttribute(String name)
Returns the attribute with the specified name belonging to this class.

Parameters:
name - the attribute name.
Returns:
the attribute map matching the specified name.

show

public void show()
Output a description of this class on stdout. Call the show method of each AttributeMap and AssociationMap.


outputXML

public void outputXML(PrintWriter out)
Output an XML representation of this class on the specified print writer. Call the outputXML method for each AssociationMap and AttributeMap.

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

classID

public short classID()
Returns the class identifier for this class.

Returns:
the class identifier for this class.

implementationName

public String implementationName()
Returns the name of the implementation class for this class.

Returns:
the name of the implementation class for this class.

name

public String name()
Returns the name of this class.

Overrides:
name in class PersistenceMap
Returns:
the name of this class.

parent

public ClassMap parent()
Returns the class map for the parent of this class.

Returns:
a class map for the parent class.

proxyName

public String proxyName()
Returns the name of the proxy class for this class.

Returns:
the name of the proxy class for this class.

basename

public String basename()
Returns the name of this class minus the package name.

Returns:
the name of this class minus the package name.

table

public TableMap table()
Returns the table map for the table to which this class is mapped.

Returns:
the table map for the table to which this class is mapped.

tables

public Iterator tables()
Returns the vector of tables used by this class.

Returns:
the vector of tables used by this class.

keyOID

public ColumnMap keyOID()
Returns the column map for the column to which the OID is mapped.

Returns:
the column map for the column to which the OID is mapped.