ojb.broker.metadata
Class DescriptorRepository

java.lang.Object
  |
  +--ojb.broker.metadata.DescriptorRepository

public class DescriptorRepository
extends java.lang.Object

The repository containing all mapping information of the PersistenceBroker. The data is stored in a xml file "repository.xml" in the directory of the main class.

Author:
Thomas Mahler

Constructor Summary
(package private) DescriptorRepository()
          Constructor declaration
 
Method Summary
 JdbcConnectionDescriptor getDefaultJdbcConnection()
          Method declaration
 ClassDescriptor getDescriptorFor(java.lang.Class c)
          lookup a ClassDescriptor in the internal Hashtable
 java.lang.Class getExtentClass(java.lang.Class clazz)
           
static DescriptorRepository getInstance()
          returns the singleton instance
static DescriptorRepository getInstance(java.lang.String repositoryFileName)
           
 java.util.Iterator iterator()
           
 void put(java.lang.Class c, ClassDescriptor cld)
          Add a ClassDescriptor to the internal Hashtable
Set the Repository for ClassDescriptor
 void setDefaultJdbcConnection(JdbcConnectionDescriptor jcd)
          Method declaration
static void setRepositoryPath(java.lang.String pathToRepository)
          set the path to the xml repository
 java.lang.String toString()
          returns a string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescriptorRepository

DescriptorRepository()
               throws PersistenceBrokerException
Constructor declaration

Method Detail

getInstance

public static DescriptorRepository getInstance()
                                        throws MetadataException
returns the singleton instance

Returns:
DescriptorRepository the singleton instance
Throws:
MetadataException

setRepositoryPath

public static void setRepositoryPath(java.lang.String pathToRepository)
set the path to the xml repository


toString

public java.lang.String toString()
returns a string representation

Overrides:
toString in class java.lang.Object

setDefaultJdbcConnection

public void setDefaultJdbcConnection(JdbcConnectionDescriptor jcd)
Method declaration

Parameters:
jcd -

getDefaultJdbcConnection

public JdbcConnectionDescriptor getDefaultJdbcConnection()
Method declaration

Returns:

put

public void put(java.lang.Class c,
                ClassDescriptor cld)
Add a ClassDescriptor to the internal Hashtable
Set the Repository for ClassDescriptor


getDescriptorFor

public ClassDescriptor getDescriptorFor(java.lang.Class c)
                                 throws ClassNotPersistenceCapableException
lookup a ClassDescriptor in the internal Hashtable

ClassNotPersistenceCapableException

getExtentClass

public java.lang.Class getExtentClass(java.lang.Class clazz)

getInstance

public static DescriptorRepository getInstance(java.lang.String repositoryFileName)
                                        throws MetadataException
Parameters:
repositoryFileName -
Returns:
the DescriptorRepository instance
Throws:
MetadataException

iterator

public java.util.Iterator iterator()


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04