org.apache.ojb.broker.metadata
Class ClassDescriptor

java.lang.Object
  extended byorg.apache.ojb.broker.metadata.DescriptorBase
      extended byorg.apache.ojb.broker.metadata.ClassDescriptor
All Implemented Interfaces:
AttributeContainer, IsolationLevels, RepositoryElements, java.io.Serializable, XmlCapable

public final class ClassDescriptor
extends DescriptorBase
implements java.io.Serializable, XmlCapable, IsolationLevels

A ClassDescriptor contains all information for mapping objects of a given class to database tables.
Note: Be careful when use ClassDescriptor variables or caching ClassDescriptor instances, because instances could become invalid during runtime (see MetadataManager).

Version:
$Id: ClassDescriptor.java,v 1.79 2004/02/08 13:19:47 tomdz Exp $
Author:
Thomas Mahler
See Also:
Serialized Form

Field Summary
static java.lang.String OJB_CONCRETE_CLASS
           
 
Fields inherited from interface org.apache.ojb.broker.metadata.RepositoryElements
_NEXT, ACCEPT_LOCKS, ACCESS, ATTRIBUTE, ATTRIBUTE_NAME, ATTRIBUTE_VALUE, AUTO_DELETE, AUTO_INCREMENT, AUTO_RETRIEVE, AUTO_UPDATE, BATCH_MODE, CLASS_DESCRIPTOR, CLASS_EXTENT, CLASS_NAME, CLASS_PROXY, CLASS_REF, COLLECTION_CLASS, COLLECTION_DESCRIPTOR, COLUMN_NAME, CON_LOG_ABANDONED, CON_MAX_ACTIVE, CON_MAX_IDLE, CON_MAX_WAIT, CON_MIN_EVICTABLE_IDLE_TIME_MILLIS, CON_NUM_TESTS_PER_EVICTION_RUN, CON_REMOVE_ABANDONED, CON_REMOVE_ABANDONED_TIMEOUT, CON_TEST_ON_BORROW, CON_TEST_ON_RETURN, CON_TEST_WHILE_IDLE, CON_TIME_BETWEEN_EVICTION_RUNS_MILLIS, CON_WHEN_EXHAUSTED_ACTION, CONNECTION_FACTORY, CONNECTION_POOL, CONSTANT_ARGUMENT, DATASOURCE_NAME, DBMS_NAME, DEFAULT_CONNECTION, DELETE_PROCEDURE, DOCUMENTATION, DRIVER_NAME, EAGER_RELEASE, EXTENDS, FACTORY_CLASS, FACTORY_METHOD, FIELD_CONVERSION, FIELD_DESCRIPTOR, FIELD_ID_REF, FIELD_NAME, FIELD_REF, FK_POINTING_TO_ITEMS_CLASS, FK_POINTING_TO_THIS_CLASS, FOREIGN_KEY, ID, IGNORE_AUTOCOMMIT_EXCEPTION, INCLUDE_ALL_FIELDS, INCLUDE_PK_FIELDS_ONLY, INDEX_COLUMN, INDEX_DESCRIPTOR, INDEXED, INDIRECTION_TABLE, INITIALIZATION_METHOD, INSERT_PROCEDURE, INVERSE_FK, ISOLATION_LEVEL, ITEMS_CLASS, JCD_ALIAS, JDBC_CONNECTION_DESCRIPTOR, JDBC_LEVEL, JDBC_TYPE, LENGTH, LOCKING, MAPPING_REPOSITORY, NAME, NULLABLE, OBJECT_CACHE, ORDERBY, OTM_DEPENDENT, PRECISION, PRIMARY_KEY, PROXY_PREFETCHING_LIMIT, PROXY_REFERENCE, QUERY_CUSTOMIZER, REFERENCE_DESCRIPTOR, REFERENCED_CLASS, REFRESH, REPOSITORY_VERSION, RETURN, RETURN_FIELD_REF, ROW_READER, RUNTIME_ARGUMENT, SCALE, SCHEMA_NAME, SEQUENCE_MANAGER, SEQUENCE_MANAGER_CLASS, SEQUENCE_NAME, SORT, TABLE_NAME, TAG_ACCESS, TAG_ACCESS_ANONYMOUS, TAG_ACCESS_READONLY, TAG_ACCESS_READWRITE, TAG_SUPER, UNIQUE, UPDATE_LOCK, UPDATE_PROCEDURE, URL_DBALIAS, URL_PROTOCOL, URL_SUBPROTOCOL, USE_AUTOCOMMIT, USER_NAME, USER_PASSWD, VALIDATION_QUERY, VALUE
 
Fields inherited from interface org.apache.ojb.broker.metadata.IsolationLevels
IL_DEFAULT, IL_OPTIMISTIC, IL_READ_COMMITTED, IL_READ_UNCOMMITTED, IL_REPEATABLE_READ, IL_SERIALIZABLE, LITERAL_IL_OPTIMISTIC, LITERAL_IL_READ_COMMITTED, LITERAL_IL_READ_UNCOMMITTED, LITERAL_IL_REPEATABLE_READ, LITERAL_IL_SERIALIZABLE
 
Constructor Summary
ClassDescriptor(DescriptorRepository pRepository)
          Constructor declaration
 
Method Summary
 void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          Store the specified attribute and it's value.
 void addCollectionDescriptor(CollectionDescriptor cod)
          Add a CollectionDescriptor.
 void addExtentClass(java.lang.Class newExtendClass)
          add an Extent class to the current descriptor
 void addExtentClass(java.lang.String newExtentClassName)
          add an Extent class to the current descriptor
 void addExtentClassName(java.lang.Class newExtendClass)
          Deprecated. use addExtentClass(String newExtentClass) instead
 void addFieldDescriptor(FieldDescriptor fld)
          adds a FIELDDESCRIPTOR to this ClassDescriptor.
 void addObjectReferenceDescriptor(ObjectReferenceDescriptor ord)
          Add a ObjectReferenceDescriptor.
 FieldDescriptor[] getAllRwFields()
          Returns array of read/write FieldDescriptors.
 java.lang.String getAttribute(java.lang.String attributeName)
          Get the value of an attribute
 java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
          Get the value of an attribute
 java.util.ArrayList getAttributeDescriptorsForPath(java.lang.String aPath)
          return all AttributeDescriptors for the path
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)
ie: partner.addresses returns a Collection of 2 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor)
 java.util.ArrayList getAttributeDescriptorsForPath(java.lang.String aPath, java.util.Map pathHints)
          return all AttributeDescriptors for the path
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)
ie: partner.addresses returns a Collection of 2 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor)
 FieldDescriptor getAutoIncrementField()
          Deprecated. does not make sense because it's possible to define more than one autoincrement field. Alternative see getAutoIncrementFields()
 FieldDescriptor[] getAutoIncrementFields()
           
 java.lang.String getBaseClass()
           
 java.lang.String getClassNameOfObject()
          returns the name of the described class
 java.lang.Class getClassOfObject()
          returns the class object of the described class
 CollectionDescriptor getCollectionDescriptorByName(java.lang.String name)
          Get an CollectionDescriptor by name BRJ
 java.util.Vector getCollectionDescriptors()
          Returns all defined CollectionDescriptor for this class descriptor.
 ValueContainer[] getCurrentLockingValues(java.lang.Object o)
          returns an Array with an Objects CURRENT locking VALUES , BRJ
 DeleteProcedureDescriptor getDeleteProcedure()
          Retrieve the descriptor for the delete procedure/function.
 java.lang.Class getDynamicProxyClass()
          returns a dynamic Proxy that implements all interfaces of the class described by this ClassDescriptor.
 java.util.Vector getExtentClasses()
          return all classes in this extent.
 java.util.Vector getExtentClassNames()
          Return the names of all classes in this extent
 java.lang.Class getFactoryClass()
          Return factory class.
 java.lang.reflect.Method getFactoryMethod()
          Return factory method.
 FieldDescriptor[] getFieldDescriptions()
          Returns array of all FieldDescriptors.
 FieldDescriptor getFieldDescriptorByIndex(int index)
          Returns the matching FieldDescriptor.
 FieldDescriptor getFieldDescriptorByName(java.lang.String name)
          Returns the matching FieldDescriptor.
 FieldDescriptor getFieldDescriptorForPath(java.lang.String aPath)
          return the FieldDescriptor for the Attribute referenced in the path
the path may contain simple attribut names, functions and path expressions using relationships
ie: name, avg(price), adress.street
 FieldDescriptor getFieldDescriptorForPath(java.lang.String aPath, java.util.Map pathHints)
          return the FieldDescriptor for the Attribute referenced in the path
the path may contain simple attribut names, functions and path expressions using relationships
ie: name, avg(price), adress.street
 FieldDescriptor[] getFieldDescriptorsInHeirarchy()
           
 java.lang.String getFullTableName()
          Answer Table name including schema BRJ
 java.util.Vector getIndexes()
          Gets the IndexDescriptors used for DDL generation.
 java.lang.reflect.Method getInitializationMethod()
          Returns the initialization method for this descriptor or null if no initialization method is defined.
 InsertProcedureDescriptor getInsertProcedure()
          Retrieve the descriptor for the insert procedure/function.
 int getIsolationLevel()
          returns the transaction isolation level to be used for this class.
 FieldDescriptor[] getLockingFields()
          return an array of FieldDescription for optimistic locking sorted ascending according to the field-descriptions getOrder() property
 FieldDescriptor[] getNonPkFields()
          return an array of NONPK-FieldDescription sorted ascending according to the field-descriptions getOrder() property
 FieldDescriptor[] getNonPkRwFields()
          Returns array of read/write non pk FieldDescriptors.
 ObjectCacheDescriptor getObjectCacheDescriptor()
          Returns the appropriate ObjectCacheDescriptor or null if not specified.
 ObjectReferenceDescriptor getObjectReferenceDescriptorByName(java.lang.String name)
          Get an ObjectReferenceDescriptor by name BRJ
 java.util.Vector getObjectReferenceDescriptors()
          Returns all defined ObjectReferenceDescriptor.
 FieldDescriptor getOjbConcreteClassField()
          Returns the ojbConcreteClass field or null if none defined.
 FieldDescriptor[] getPkFields()
          return an array of PK FieldDescription sorted ascending according to the field-descriptions getOrder() property
 FieldDescriptor getPrimaryKey()
          convenience function to get the first primary key
 java.lang.Class getProxyClass()
          Insert the method's description here.
 java.lang.String getProxyClassName()
          Get the name of the proxy class.
 int getProxyPrefetchingLimit()
           
 DescriptorRepository getRepository()
          Gets the repository.
 RowReader getRowReader()
          Returns the RowReader for this descriptor.
 java.lang.String getRowReaderClassName()
           
 java.lang.String getSchema()
          Gets the schema.
 StatementsForClassIF getStatementsForClass(ConnectionManagerIF conMan)
           
 java.lang.String getSuperClass()
          Return the super class or null if not declared in repository file.
 int getSuperClassFieldRef()
          TODO drop this method?
 java.util.Vector getSuperPersistentFieldDescriptors()
           
 UpdateProcedureDescriptor getUpdateProcedure()
          Retrieve the descriptor for the update procedure/function.
 java.lang.reflect.Constructor getZeroArgumentConstructor()
          returns the zero argument constructor for the class represented by this class descriptor or null if a zero argument constructor does not exist.
 boolean isAbstract()
           
 boolean isAcceptLocks()
          Returns acceptLocks.
 boolean isAlwaysRefresh()
          if true instances of this class are always refreshed even if they are already in the cache.
 boolean isExtent()
          Insert the method's description here.
 boolean isInterface()
          Return true, if the described class is an interface.
 boolean isLocking()
          return true if optimistic locking is used
 void removeCollectionDescriptor(CollectionDescriptor cod)
           
 void removeExtentClass(java.lang.String extentClassName)
           
 boolean removeFieldDescriptor(FieldDescriptor fld)
           
 void removeObjectReferenceDescriptor(ObjectReferenceDescriptor ord)
           
 void setAcceptLocks(boolean acceptLocks)
          Sets acceptLocks.
 void setAlwaysRefresh(boolean alwaysRefresh)
          Sets the alwaysRefresh parameter.
 void setBaseClass(java.lang.String baseClass)
           
 void setClassOfObject(java.lang.Class c)
          sets the class object described by this descriptor.
 void setDeleteProcedure(DeleteProcedureDescriptor newValue)
          Change the descriptor for the delete procedure/function.
 void setFactoryClass(java.lang.Class newClass)
          Set the object factory for class described by this descriptor.
 void setFactoryClass(java.lang.String newClass)
           
 void setFactoryMethod(java.lang.String factoryMethodName)
          sets the initialization method for this descriptor by name
 void setIndexes(java.util.Vector indexes)
          Sets the IndexDescriptors used for DDL generation.
 void setInitializationMethod(java.lang.String newMethodName)
          sets the initialization method for this descriptor by name
 void setInsertProcedure(InsertProcedureDescriptor newValue)
          Change the descriptor for the insert procedure/function.
 void setIsInterface(boolean newIsInterface)
          Set true if described class is a interface.
 void setIsolationLevel(int isoLevel)
          Method declaration
 void setObjectCacheDescriptor(ObjectCacheDescriptor objectCacheDescriptor)
          Sets the ObjectCacheDescriptor for representing class.
 void setProxyClass(java.lang.Class newProxyClass)
          Sets the proxy class to be used.
 void setProxyClassName(java.lang.String newProxyClassName)
          Sets the name of the proxy class to be used.
 void setProxyPrefetchingLimit(int proxyPrefetchingLimit)
           
 void setRepository(DescriptorRepository repository)
          Sets the repository.
 void setRowReader(RowReader newReader)
          sets the row reader class for this descriptor
 void setRowReader(java.lang.String newReaderClassName)
          sets the row reader class name for thie class descriptor
 void setSchema(java.lang.String schema)
          Sets the schema.
 void setSuperClass(java.lang.String classname)
          Set name of the super class.
 void setSuperClassFieldRef(int fieldId)
          TODO drop this method?
 void setSuperPersistentFieldDescriptors(java.util.Vector superPersistentFieldDescriptors)
           
 void setTableName(java.lang.String str)
          Method declaration
 void setUpdateProcedure(UpdateProcedureDescriptor newValue)
          Change the descriptor for the update procedure/function.
 java.lang.String toString()
          Return a string representation of this class.
 java.lang.String toXML()
          returns the XML marshalled version of this instance.
 void updateLockingValues(java.lang.Object obj)
          updates the values for locking fields , BRJ handles int, long, Timestamp respects updateLock so locking field are only updated when updateLock is true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OJB_CONCRETE_CLASS

public static final java.lang.String OJB_CONCRETE_CLASS
See Also:
Constant Field Values
Constructor Detail

ClassDescriptor

public ClassDescriptor(DescriptorRepository pRepository)
Constructor declaration

Method Detail

getBaseClass

public java.lang.String getBaseClass()

setBaseClass

public void setBaseClass(java.lang.String baseClass)

setSuperPersistentFieldDescriptors

public void setSuperPersistentFieldDescriptors(java.util.Vector superPersistentFieldDescriptors)

getSuperPersistentFieldDescriptors

public java.util.Vector getSuperPersistentFieldDescriptors()

getObjectCacheDescriptor

public ObjectCacheDescriptor getObjectCacheDescriptor()
Returns the appropriate ObjectCacheDescriptor or null if not specified.


setObjectCacheDescriptor

public void setObjectCacheDescriptor(ObjectCacheDescriptor objectCacheDescriptor)
Sets the ObjectCacheDescriptor for representing class.


setRowReader

public void setRowReader(RowReader newReader)
sets the row reader class for this descriptor


getRowReader

public RowReader getRowReader()
Returns the RowReader for this descriptor.


setRowReader

public void setRowReader(java.lang.String newReaderClassName)
sets the row reader class name for thie class descriptor


getRowReaderClassName

public java.lang.String getRowReaderClassName()

getClassNameOfObject

public java.lang.String getClassNameOfObject()
returns the name of the described class

Returns:
String name of the described class

getClassOfObject

public java.lang.Class getClassOfObject()
returns the class object of the described class

Returns:
Class the described class

setClassOfObject

public void setClassOfObject(java.lang.Class c)
sets the class object described by this descriptor.

Parameters:
c - the class to describe

addFieldDescriptor

public void addFieldDescriptor(FieldDescriptor fld)
adds a FIELDDESCRIPTOR to this ClassDescriptor.

Parameters:
fld -

removeFieldDescriptor

public boolean removeFieldDescriptor(FieldDescriptor fld)

getCollectionDescriptors

public java.util.Vector getCollectionDescriptors()
Returns all defined CollectionDescriptor for this class descriptor.


addCollectionDescriptor

public void addCollectionDescriptor(CollectionDescriptor cod)
Add a CollectionDescriptor.


removeCollectionDescriptor

public void removeCollectionDescriptor(CollectionDescriptor cod)

getObjectReferenceDescriptors

public java.util.Vector getObjectReferenceDescriptors()
Returns all defined ObjectReferenceDescriptor.


addObjectReferenceDescriptor

public void addObjectReferenceDescriptor(ObjectReferenceDescriptor ord)
Add a ObjectReferenceDescriptor.


removeObjectReferenceDescriptor

public void removeObjectReferenceDescriptor(ObjectReferenceDescriptor ord)

getObjectReferenceDescriptorByName

public ObjectReferenceDescriptor getObjectReferenceDescriptorByName(java.lang.String name)
Get an ObjectReferenceDescriptor by name BRJ

Parameters:
name -
Returns:
ObjectReferenceDescriptor or null

getCollectionDescriptorByName

public CollectionDescriptor getCollectionDescriptorByName(java.lang.String name)
Get an CollectionDescriptor by name BRJ

Parameters:
name -
Returns:
CollectionDescriptor or null

addExtentClassName

public void addExtentClassName(java.lang.Class newExtendClass)
Deprecated. use addExtentClass(String newExtentClass) instead

add an Extent class to the current descriptor

Parameters:
newExtendClass -

addExtentClass

public void addExtentClass(java.lang.Class newExtendClass)
add an Extent class to the current descriptor

Parameters:
newExtendClass -

addExtentClass

public void addExtentClass(java.lang.String newExtentClassName)
add an Extent class to the current descriptor

Parameters:
newExtentClassName - name of the class to add

removeExtentClass

public void removeExtentClass(java.lang.String extentClassName)

getExtentClasses

public java.util.Vector getExtentClasses()
return all classes in this extent. Creation date: (02.02.2001 17:49:11)

Returns:
java.util.Vector

getExtentClassNames

public java.util.Vector getExtentClassNames()
Return the names of all classes in this extent

Returns:
java.util.Vector a Vector containing the fully qualified names of all classes in this extent

isExtent

public boolean isExtent()
Insert the method's description here. Creation date: (02.02.2001 17:49:11)

Returns:
boolean

getProxyClass

public java.lang.Class getProxyClass()
Insert the method's description here. Creation date: (26.01.2001 09:20:09)

Returns:
java.lang.Class

setProxyClass

public void setProxyClass(java.lang.Class newProxyClass)
Sets the proxy class to be used.

Parameters:
newProxyClass - java.lang.Class

setProxyClassName

public void setProxyClassName(java.lang.String newProxyClassName)
Sets the name of the proxy class to be used. using "dynamic" instead of a real classname will result in usage of dynamic proxies.

Parameters:
newProxyClassName - the classname or "dynamic"

getProxyClassName

public java.lang.String getProxyClassName()
Get the name of the proxy class. This method doesn't try to access the real class, so it can be called even if the class doesn't exist.


getFieldDescriptions

public FieldDescriptor[] getFieldDescriptions()
Returns array of all FieldDescriptors.


getFieldDescriptorByIndex

public FieldDescriptor getFieldDescriptorByIndex(int index)
Returns the matching FieldDescriptor.


getFieldDescriptorByName

public FieldDescriptor getFieldDescriptorByName(java.lang.String name)
Returns the matching FieldDescriptor.


getFieldDescriptorForPath

public FieldDescriptor getFieldDescriptorForPath(java.lang.String aPath,
                                                 java.util.Map pathHints)
return the FieldDescriptor for the Attribute referenced in the path
the path may contain simple attribut names, functions and path expressions using relationships
ie: name, avg(price), adress.street

Parameters:
aPath - the path to the attribute
pathHints - a Map containing the class to be used for a segment
Returns:
the FieldDescriptor or null (ie: for m:n queries)

getFieldDescriptorForPath

public FieldDescriptor getFieldDescriptorForPath(java.lang.String aPath)
return the FieldDescriptor for the Attribute referenced in the path
the path may contain simple attribut names, functions and path expressions using relationships
ie: name, avg(price), adress.street

Parameters:
aPath - the path to the attribute
Returns:
the FieldDescriptor or null (ie: for m:n queries)

getFieldDescriptorsInHeirarchy

public FieldDescriptor[] getFieldDescriptorsInHeirarchy()
Returns:
this classes FieldDescriptor's as well as it's parents and so on and so on

getAutoIncrementField

public FieldDescriptor getAutoIncrementField()
Deprecated. does not make sense because it's possible to define more than one autoincrement field. Alternative see getAutoIncrementFields()

Returns the first found autoincrement field defined in this class descriptor. Use carefully when multiple autoincrement field were defined.


getAutoIncrementFields

public FieldDescriptor[] getAutoIncrementFields()

getCurrentLockingValues

public ValueContainer[] getCurrentLockingValues(java.lang.Object o)
                                         throws PersistenceBrokerException
returns an Array with an Objects CURRENT locking VALUES , BRJ

Throws:
PersistenceBrokerException - if there is an erros accessing o field values

updateLockingValues

public void updateLockingValues(java.lang.Object obj)
                         throws PersistenceBrokerException
updates the values for locking fields , BRJ handles int, long, Timestamp respects updateLock so locking field are only updated when updateLock is true

Throws:
PersistenceBrokerException - if there is an erros accessing obj field values

getNonPkFields

public FieldDescriptor[] getNonPkFields()
return an array of NONPK-FieldDescription sorted ascending according to the field-descriptions getOrder() property


getPkFields

public FieldDescriptor[] getPkFields()
return an array of PK FieldDescription sorted ascending according to the field-descriptions getOrder() property


getNonPkRwFields

public FieldDescriptor[] getNonPkRwFields()
Returns array of read/write non pk FieldDescriptors.


getAllRwFields

public FieldDescriptor[] getAllRwFields()
Returns array of read/write FieldDescriptors.


getPrimaryKey

public FieldDescriptor getPrimaryKey()
convenience function to get the first primary key

useful when there is only one


getLockingFields

public FieldDescriptor[] getLockingFields()
return an array of FieldDescription for optimistic locking sorted ascending according to the field-descriptions getOrder() property


isLocking

public boolean isLocking()
return true if optimistic locking is used


getDynamicProxyClass

public java.lang.Class getDynamicProxyClass()
returns a dynamic Proxy that implements all interfaces of the class described by this ClassDescriptor.

Returns:
Class the dynamically created proxy class

getAttributeDescriptorsForPath

public java.util.ArrayList getAttributeDescriptorsForPath(java.lang.String aPath)
return all AttributeDescriptors for the path
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)
ie: partner.addresses returns a Collection of 2 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor)

Parameters:
aPath - the cleaned path to the attribute
Returns:
ArrayList of AttributeDescriptors

getAttributeDescriptorsForPath

public java.util.ArrayList getAttributeDescriptorsForPath(java.lang.String aPath,
                                                          java.util.Map pathHints)
return all AttributeDescriptors for the path
ie: partner.addresses.street returns a Collection of 3 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor, FieldDescriptor)
ie: partner.addresses returns a Collection of 2 AttributeDescriptors (ObjectReferenceDescriptor, CollectionDescriptor)

Parameters:
aPath - the cleaned path to the attribute
pathHints - a Map containing the class to be used for a segment
Returns:
ArrayList of AttributeDescriptors

getZeroArgumentConstructor

public java.lang.reflect.Constructor getZeroArgumentConstructor()
returns the zero argument constructor for the class represented by this class descriptor or null if a zero argument constructor does not exist. If the zero argument constructor for this class is not public it is made accessible before being returned.


toXML

public java.lang.String toXML()
Description copied from interface: XmlCapable
returns the XML marshalled version of this instance.

Specified by:
toXML in interface XmlCapable
Returns:
the XML String representing this object.

setSuperClass

public void setSuperClass(java.lang.String classname)
Set name of the super class.


getSuperClass

public java.lang.String getSuperClass()
Return the super class or null if not declared in repository file.


setSuperClassFieldRef

public void setSuperClassFieldRef(int fieldId)
TODO drop this method?


getSuperClassFieldRef

public int getSuperClassFieldRef()
TODO drop this method?


isInterface

public boolean isInterface()
Return true, if the described class is an interface.


setIsInterface

public void setIsInterface(boolean newIsInterface)
Set true if described class is a interface.


isAbstract

public boolean isAbstract()
Returns:
boolean true if the mapped class is abstract

isAcceptLocks

public boolean isAcceptLocks()
Returns acceptLocks.

Returns:
boolean

setAcceptLocks

public void setAcceptLocks(boolean acceptLocks)
Sets acceptLocks.

Parameters:
acceptLocks - The m_acceptLocks to set

getIndexes

public java.util.Vector getIndexes()
Gets the IndexDescriptors used for DDL generation.


setIndexes

public void setIndexes(java.util.Vector indexes)
Sets the IndexDescriptors used for DDL generation.


getRepository

public DescriptorRepository getRepository()
Gets the repository.

Returns:
Returns a DescriptorRepository

setRepository

public void setRepository(DescriptorRepository repository)
Sets the repository.

Parameters:
repository - The repository to set

getIsolationLevel

public int getIsolationLevel()
returns the transaction isolation level to be used for this class. Used only in the ODMG server


setIsolationLevel

public void setIsolationLevel(int isoLevel)
Method declaration

Parameters:
isoLevel -

setTableName

public void setTableName(java.lang.String str)
Method declaration

Parameters:
str -

getFullTableName

public java.lang.String getFullTableName()
Answer Table name including schema BRJ


getSchema

public java.lang.String getSchema()
Gets the schema.

Returns:
Returns a String

setSchema

public void setSchema(java.lang.String schema)
Sets the schema.

Parameters:
schema - The schema to set

toString

public java.lang.String toString()
Return a string representation of this class.

Overrides:
toString in class DescriptorBase

setInitializationMethod

public void setInitializationMethod(java.lang.String newMethodName)
sets the initialization method for this descriptor by name


getInitializationMethod

public java.lang.reflect.Method getInitializationMethod()
Returns the initialization method for this descriptor or null if no initialization method is defined.


isAlwaysRefresh

public boolean isAlwaysRefresh()
if true instances of this class are always refreshed even if they are already in the cache.

Returns:
boolean

setAlwaysRefresh

public void setAlwaysRefresh(boolean alwaysRefresh)
Sets the alwaysRefresh parameter.

Parameters:
alwaysRefresh - The value to set

getProxyPrefetchingLimit

public int getProxyPrefetchingLimit()

setProxyPrefetchingLimit

public void setProxyPrefetchingLimit(int proxyPrefetchingLimit)

getFactoryClass

public java.lang.Class getFactoryClass()
Return factory class.


getFactoryMethod

public java.lang.reflect.Method getFactoryMethod()
Return factory method.


setFactoryClass

public void setFactoryClass(java.lang.Class newClass)
Set the object factory for class described by this descriptor.

See Also:
setFactoryMethod(java.lang.String)

setFactoryClass

public void setFactoryClass(java.lang.String newClass)
See Also:
setFactoryClass(java.lang.Class)

setFactoryMethod

public void setFactoryMethod(java.lang.String factoryMethodName)
sets the initialization method for this descriptor by name


setInsertProcedure

public void setInsertProcedure(InsertProcedureDescriptor newValue)
Change the descriptor for the insert procedure/function.

Parameters:
newValue - the new value.

getInsertProcedure

public InsertProcedureDescriptor getInsertProcedure()
Retrieve the descriptor for the insert procedure/function.

Returns:
The current value

setUpdateProcedure

public void setUpdateProcedure(UpdateProcedureDescriptor newValue)
Change the descriptor for the update procedure/function.

Parameters:
newValue - the new value.

getUpdateProcedure

public UpdateProcedureDescriptor getUpdateProcedure()
Retrieve the descriptor for the update procedure/function.

Returns:
The current value

setDeleteProcedure

public void setDeleteProcedure(DeleteProcedureDescriptor newValue)
Change the descriptor for the delete procedure/function.

Parameters:
newValue - the new value.

getDeleteProcedure

public DeleteProcedureDescriptor getDeleteProcedure()
Retrieve the descriptor for the delete procedure/function.

Returns:
The current value

getOjbConcreteClassField

public FieldDescriptor getOjbConcreteClassField()
Returns the ojbConcreteClass field or null if none defined.


getStatementsForClass

public StatementsForClassIF getStatementsForClass(ConnectionManagerIF conMan)

addAttribute

public void addAttribute(java.lang.String attributeName,
                         java.lang.String attributeValue)
Description copied from interface: AttributeContainer
Store the specified attribute and it's value.

Specified by:
addAttribute in interface AttributeContainer
Parameters:
attributeName - the name of the attribute to retrieve
attributeValue - the attribute's value
See Also:
AttributeContainer.addAttribute(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName,
                                     java.lang.String defaultValue)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
defaultValue - the value to return if the attribute is not present
Returns:
the attribute value
See Also:
AttributeContainer.getAttribute(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
Returns:
the attribute value
See Also:
AttributeContainer.getAttribute(String)


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14