SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.meta
Class JDOMetaDataRepositoryImpl

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.meta.JDOMetaDataRepositoryImpl
All Implemented Interfaces:
java.util.EventListener, JDOMetaDataRepository, javax.jdo.spi.RegisterClassListener

public class JDOMetaDataRepositoryImpl
extends java.lang.Object
implements JDOMetaDataRepository

Default JDOMetaDataRepository implementation.


Constructor Summary
JDOMetaDataRepositoryImpl(com.solarmetric.rd.kodo.conf.JDOConfiguration conf)
          Constructor.
 
Method Summary
 void addMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData meta)
          Add a metadata instance to the repository.
 void clear()
          Clear the cache of parsed metadata.
 com.solarmetric.rd.kodo.conf.JDOConfiguration getConfiguration()
          Return the configuration for the repository.
 com.solarmetric.rd.kodo.meta.ClassMetaData getEmbeddedMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData owner, int field)
          Return the class metadata for the embedded value of the given field.
 com.solarmetric.rd.kodo.meta.JDOMetaDataGenerator getGenerator()
          Return the generator to use to create default metadata.
 com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData(java.lang.Class cls, java.lang.ClassLoader pmLoader, boolean validate)
          Return the metadata for the given class.
 com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData(java.lang.Object oid, java.lang.ClassLoader pmLoader, boolean validate)
          Return the least-derived class metadata for the given oid.
 com.solarmetric.rd.kodo.meta.ClassMetaData[] getMetaDatas()
          Return all the metadata instances currently in the repository.
 com.solarmetric.rd.kodo.meta.JDOMetaDataParser getParser()
          Return the parser to use to parse jdo metadata files.
 boolean hasMetaData(java.lang.Class cls)
          Return true if the repository has metadata for the given class.
 void registerClass(javax.jdo.spi.RegisterClassEvent ev)
           
 boolean removeMetaData(java.lang.Class cls)
          Remove a metadata instance from the repository.
 boolean removeMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData meta)
          Remove a metadata instance from the repository.
 void setGenerator(com.solarmetric.rd.kodo.meta.JDOMetaDataGenerator generator)
          Set the generator to use to create default metadata.
 void setParser(com.solarmetric.rd.kodo.meta.JDOMetaDataParser parser)
          Set the parser to use to parse jdo metadata files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOMetaDataRepositoryImpl

public JDOMetaDataRepositoryImpl(com.solarmetric.rd.kodo.conf.JDOConfiguration conf)
Constructor. Supply configuration.

Method Detail

getConfiguration

public com.solarmetric.rd.kodo.conf.JDOConfiguration getConfiguration()
Description copied from interface: JDOMetaDataRepository
Return the configuration for the repository.

Specified by:
getConfiguration in interface JDOMetaDataRepository

getParser

public com.solarmetric.rd.kodo.meta.JDOMetaDataParser getParser()
Description copied from interface: JDOMetaDataRepository
Return the parser to use to parse jdo metadata files. Defaults to a standard JDOMetaDataParser.

Specified by:
getParser in interface JDOMetaDataRepository

setParser

public void setParser(com.solarmetric.rd.kodo.meta.JDOMetaDataParser parser)
Description copied from interface: JDOMetaDataRepository
Set the parser to use to parse jdo metadata files. Defaults to a standard JDOMetaDataParser.

Specified by:
setParser in interface JDOMetaDataRepository

getGenerator

public com.solarmetric.rd.kodo.meta.JDOMetaDataGenerator getGenerator()
Description copied from interface: JDOMetaDataRepository
Return the generator to use to create default metadata. Defaults to a standard JDOMetaDataGenerator.

Specified by:
getGenerator in interface JDOMetaDataRepository

setGenerator

public void setGenerator(com.solarmetric.rd.kodo.meta.JDOMetaDataGenerator generator)
Description copied from interface: JDOMetaDataRepository
Set the generator to use to create default metadata. Defaults to a standard JDOMetaDataGenerator.

Specified by:
setGenerator in interface JDOMetaDataRepository

getMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData(java.lang.Class cls,
                                                              java.lang.ClassLoader pmLoader,
                                                              boolean validate)
Description copied from interface: JDOMetaDataRepository
Return the metadata for the given class.

Specified by:
getMetaData in interface JDOMetaDataRepository
Parameters:
cls - the class to retrieve metadata for
pmLoader - the persistence manager's class loader, if any
validate - if true, throws a JDOMetaDataNotFoundException if no metadat is found

getEmbeddedMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getEmbeddedMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData owner,
                                                                      int field)
Description copied from interface: JDOMetaDataRepository
Return the class metadata for the embedded value of the given field.

Specified by:
getEmbeddedMetaData in interface JDOMetaDataRepository

getMetaDatas

public com.solarmetric.rd.kodo.meta.ClassMetaData[] getMetaDatas()
Description copied from interface: JDOMetaDataRepository
Return all the metadata instances currently in the repository.

Specified by:
getMetaDatas in interface JDOMetaDataRepository

hasMetaData

public boolean hasMetaData(java.lang.Class cls)
Description copied from interface: JDOMetaDataRepository
Return true if the repository has metadata for the given class.

Specified by:
hasMetaData in interface JDOMetaDataRepository

addMetaData

public void addMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData meta)
Description copied from interface: JDOMetaDataRepository
Add a metadata instance to the repository.

Specified by:
addMetaData in interface JDOMetaDataRepository

removeMetaData

public boolean removeMetaData(com.solarmetric.rd.kodo.meta.ClassMetaData meta)
Description copied from interface: JDOMetaDataRepository
Remove a metadata instance from the repository.

Specified by:
removeMetaData in interface JDOMetaDataRepository
Returns:
true if removed, false if not in this repository

removeMetaData

public boolean removeMetaData(java.lang.Class cls)
Description copied from interface: JDOMetaDataRepository
Remove a metadata instance from the repository.

Specified by:
removeMetaData in interface JDOMetaDataRepository
Returns:
true if removed, false if not in this repository

getMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getMetaData(java.lang.Object oid,
                                                              java.lang.ClassLoader pmLoader,
                                                              boolean validate)
Description copied from interface: JDOMetaDataRepository
Return the least-derived class metadata for the given oid.

Specified by:
getMetaData in interface JDOMetaDataRepository
Parameters:
oid - the oid to get the metadata for
pmLoader - the persistence manager's class loader, if any
validate - if true, throws a JDOMetaDataNotFoundException if no metadat is found

registerClass

public void registerClass(javax.jdo.spi.RegisterClassEvent ev)
Specified by:
registerClass in interface javax.jdo.spi.RegisterClassListener

clear

public void clear()
Description copied from interface: JDOMetaDataRepository
Clear the cache of parsed metadata. This method also clears the internal parser's cache of parsed files.

Specified by:
clear in interface JDOMetaDataRepository

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.