org.exolab.castor.jdo.engine
Class JDOClassDescriptor

java.lang.Object
  extended by org.exolab.castor.mapping.loader.ClassDescriptorImpl
      extended by org.exolab.castor.jdo.engine.JDOClassDescriptor
All Implemented Interfaces:
ClassDescriptor

public class JDOClassDescriptor
extends ClassDescriptorImpl

JDO class descriptors. Extends ClassDescriptor to include the table name and other SQL-related information. All fields are of type JDOFieldDescriptor, identity field is not included in the returned field list, and contained fields are flattened out for efficiency (thus all fields are directly accessible).

Version:
$Revision: 1.3 $ $Date: 2004/06/16 09:46:22 $
Author:
Assaf Arkin

Field Summary
 
Fields inherited from class org.exolab.castor.mapping.loader.ClassDescriptorImpl
_fields, _identities
 
Constructor Summary
JDOClassDescriptor(ClassDescriptor clsDesc, java.lang.String tableName, KeyGeneratorDescriptor keyGenDesc, java.lang.String cacheType, int cacheParam)
           
 
Method Summary
 int getCacheParam()
          Returns the preferred mechanism for caching instance of this class
 java.lang.String getCacheType()
          Returns the preferred mechanism for caching instance of this class
 ClassDescriptor getDepends()
           
 JDOFieldDescriptor getField(java.lang.String name)
          Returns a JDOFieldDescriptor for the field with the name passed.
 java.lang.String[] getIdentityColumnNames()
           
 KeyGeneratorDescriptor getKeyGeneratorDescriptor()
          Returns the key generator specified for this class.
 java.lang.String getTableName()
          Returns the table name to which this object maps.
 java.lang.String toString()
           
 
Methods inherited from class org.exolab.castor.mapping.loader.ClassDescriptorImpl
addExtendedBy, checkValidity, getAccessMode, getExtendedBy, getExtends, getFields, getIdentities, getIdentity, getJavaClass, getMapping, isExtended, isExtending, setMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDOClassDescriptor

public JDOClassDescriptor(ClassDescriptor clsDesc,
                          java.lang.String tableName,
                          KeyGeneratorDescriptor keyGenDesc,
                          java.lang.String cacheType,
                          int cacheParam)
                   throws MappingException
Throws:
MappingException
Method Detail

getTableName

public java.lang.String getTableName()
Returns the table name to which this object maps.

Returns:
Table name

getDepends

public ClassDescriptor getDepends()
Overrides:
getDepends in class ClassDescriptorImpl

getCacheType

public java.lang.String getCacheType()
Returns the preferred mechanism for caching instance of this class

Returns:
a String represent the cache type

getCacheParam

public int getCacheParam()
Returns the preferred mechanism for caching instance of this class

Returns:
an int represent the param

getField

public JDOFieldDescriptor getField(java.lang.String name)
Returns a JDOFieldDescriptor for the field with the name passed. Null if named field does not exist.

Parameters:
name - The name of the field to return
Returns:
The field if it exists, otherwise null.

getKeyGeneratorDescriptor

public KeyGeneratorDescriptor getKeyGeneratorDescriptor()
Returns the key generator specified for this class.

Returns:
The key generator descriptor

getIdentityColumnNames

public java.lang.String[] getIdentityColumnNames()
Returns:
The names of columns that the identity consists of.

toString

public java.lang.String toString()
Overrides:
toString in class ClassDescriptorImpl


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com