Method Summary |
|
public void | addProfile(Object key, DescriptorRepository repository) Add a metadata profile. |
public void | clearProfiles() Remove all metadata profiles. |
public ConnectionRepository | connectionRepository() Returns the
ConnectionRepository . |
public DescriptorRepository | copyOfGlobalRepository() Returns a copy of the current global
org.apache.ojb.broker.metadata.DescriptorRepository
Note: All classes within the repository structure have to implement
java.io.Serializable to be able to create a cloned copy. |
public Object | getCurrentProfileKey() Returns the last activated profile key. |
public PBKey | getDefaultPBKey() Return the default
PBKey used in convinience method
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker . |
public DescriptorRepository | getGlobalRepository() Returns explicit the global
org.apache.ojb.broker.metadata.DescriptorRepository - use with
care, because it ignores the
MetadataManager.isEnablePerThreadChanges per thread mode . |
public static synchronized MetadataManager | getInstance() Returns an instance of this class. |
public DescriptorRepository | getRepository() Returns the current valid
org.apache.ojb.broker.metadata.DescriptorRepository for
the caller. |
public boolean | isEnablePerThreadChanges() If returns true if per thread runtime
changes of the
org.apache.ojb.broker.metadata.DescriptorRepository is enabled and the
MetadataManager.getRepository method returns a threaded
repository file if set, or the global if no threaded was found. |
public void | loadProfile(Object key) Load the given metadata profile for the current thread. |
public void | mergeConnectionRepository(ConnectionRepository repository) Merge the given
ConnectionRepository with the existing one (without making
a deep copy of the containing connection descriptors). |
public void | mergeConnectionRepository(ConnectionRepository targetRepository, ConnectionRepository sourceRepository, boolean deep) Merge the given source
ConnectionRepository with the
existing target. |
public void | mergeDescriptorRepository(DescriptorRepository repository) Merge the given
org.apache.ojb.broker.metadata.DescriptorRepository (without making a deep copy of containing class-descriptor objects) with the
global one, returned by method
MetadataManager.getRepository() - keep
in mind if running in per thread mode
merge maybe only takes effect on current thread. |
public void | mergeDescriptorRepository(DescriptorRepository targetRepository, DescriptorRepository sourceRepository, boolean deep) Merge the given
org.apache.ojb.broker.metadata.DescriptorRepository files, the source objects will be pushed to the target repository. |
public ConnectionRepository | readConnectionRepository(String fileName) Read JdbcConnectionDescriptors from the given repository file. |
public ConnectionRepository | readConnectionRepository(InputStream inst) Read JdbcConnectionDescriptors from this InputStream. |
public DescriptorRepository | readDescriptorRepository(String fileName) Read ClassDescriptors from the given repository file. |
public DescriptorRepository | readDescriptorRepository(InputStream inst) Read ClassDescriptors from the given InputStream. |
public void | removeAllProfiles() |
public DescriptorRepository | removeProfile(Object key) Remove the given metadata profile. |
public void | setDefaultPBKey(PBKey defaultPBKey) Set the
PBKey used in convinience method
org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker .
It's only allowed to use one
JdbcConnectionDescriptor with enabled
JdbcConnectionDescriptor.isDefaultConnection default connection . |
public void | setDescriptor(DescriptorRepository repository, boolean global) Set the
org.apache.ojb.broker.metadata.DescriptorRepository - if global was true, the
given descriptor aquire global availability (use with care!),
else the given descriptor was associated with the calling thread. |
public void | setDescriptor(DescriptorRepository repository) Set
DescriptorRepository for the current thread. |
public void | setEnablePerThreadChanges(boolean enablePerThreadChanges) Enable the possibility of making per thread runtime changes
of the
org.apache.ojb.broker.metadata.DescriptorRepository . |
public void | setPerThreadDescriptor(DescriptorRepository repository) Convenience method for
MetadataManager.setDescriptor setDescriptor(repository, false) . |
public void | shutdown() |