org.norther.tammi.root.ojb
Interface OJBPersisterFactory

All Superinterfaces:
CacheClient, Configurable, ConfigurableFactory, KeyCacheClient, ObjectFactory, PersisterFactory, Refreshable, Startable
All Known Implementing Classes:
DefaultOJBPersisterFactory

public interface OJBPersisterFactory
extends PersisterFactory, Startable

An interface to org.apache.ojb.broker.PersistenceBroker factories.

OJB specific implementation of Persister is produced when requesting an OJBPersister instance.

The factory is configured through a property file as specified in OJB properties .

Author:
Ilkka Priha

Field Summary
static String EXT_INITIALIZER_CLASS_NAME
          The connection initializer attribute.
static String PERSISTER_CLASS_NAME
          The persister class name.
 
Fields inherited from interface org.norther.tammi.root.db.PersisterFactory
ANY_ALIAS, EXT_BASE_CLASS_NAME, EXT_BEGIN_CLASS, EXT_BEGIN_FIELD, EXT_BLANK_ACCEPTED, EXT_CLONEABLE, EXT_COLLECTION, EXT_COMPARATOR_CLASS_NAME, EXT_CORRELATIVE, EXT_DESCENDING, EXT_DESCRIPTION, EXT_DETAIL, EXT_DISABLED, EXT_EMPTY_ACCEPTED, EXT_END_CLASS, EXT_END_FIELD, EXT_ENUM_NAME, EXT_ENUM_VALUE, EXT_ENUMERATED, EXT_EXPORTER_CLASS_NAME, EXT_GROUP, EXT_IMPORTER_CLASS_NAME, EXT_INDEX, EXT_INTERACTIVE, EXT_LOCAL, EXT_LOCALIZED, EXT_MANDATORY, EXT_MAX_VALUE, EXT_MIN_VALUE, EXT_NAME_PATTERN, EXT_OPTIONS, EXT_ORDER_BY, EXT_ORDERED, EXT_PATTERN, EXT_PRIMARY, EXT_READABLE, EXT_REFERENCE, EXT_SERIALIZED, EXT_SHADOW, EXT_SORTED, EXT_TRACEABLE, EXT_TRANSIENT, EXT_TRIMMED, EXT_TYPE, EXT_VALIDATOR_CLASS_NAME, EXT_VALUE, EXT_VISIBLE, EXT_WRITABLE, JDBC_TYPE_PROPERTY
 
Method Summary
 Map classDescriptorMap()
          Returns a map of defined class descriptors.
 Map connectionDescriptorMap()
          Returns a map of defined connection descriptors.
 ClassDescriptor getClassDescriptor(String className)
          Gets the class descriptor of the specified class from the repository.
 JdbcConnectionDescriptor getConnectionDescriptor()
          Gets the default connection descriptor from the repository.
 JdbcConnectionDescriptor getConnectionDescriptor(String key)
          Gets the connection descriptor of the specified connection from the repository.
 JdbcConnectionDescriptor getConnectionDescriptor(String key, String user, String pswd)
          Gets the connection descriptor of the specified connection for the given user from the repository.
 String getConnectionPlatform(String key)
          Gets the DB platform of the specified connection.
 FieldDescriptor getFieldDescriptor(String className, String attribute)
          Gets the field descriptor of the specified class and attribute from the repository.
 String getLoggingFilePath()
          Gets the logging file path.
 void setLoggingFilePath(String path)
          Sets the logging file path.
 
Methods inherited from interface org.norther.tammi.root.db.PersisterFactory
addClassDescriptor, addClassDescriptor, addClassDescriptor, clearClassDescriptors, clearConnectionDescriptors, containsClassDescriptor, containsConnectionDescriptor, getAttributeType, getConnectionDTD, getConnectionURL, getConnectionUsername, getDefaultConnectionKey, getLastModified, getRepositoryDTD, getVariableRegistryName, isCombinedFactoryCache, isRefreshReferencesEnabled, isTraceReferencesDisabled, jdbcTypeSet, query, query, removeAttributeType, removeConnectionDescriptor, removeConnectionDescriptor, setAttributeType, setCombinedFactoryCache, setConnectionDescriptor, setConnectionDescriptor, setConnectionDTD, setConnectionPassword, setConnectionURL, setConnectionUsername, setDefaultConnectionKey, setDefaultConnectionKey, setRefreshReferencesEnabled, setRepositoryDTD, setTraceReferencesDisabled, setVariableRegistryName
 
Methods inherited from interface org.norther.tammi.core.base.ObjectFactory
getInstance, getInstance, getInstance, getInstance, isLoaderSupported
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties
 
Methods inherited from interface org.norther.tammi.core.cache.KeyCacheClient
cacheKeySet, clearCaches, getCache, removeCache
 
Methods inherited from interface org.norther.tammi.core.cache.CacheClient
clearCached, expireCached, expireFraction, getCache, isCachingDisabled, removeCache, setCachingDisabled
 
Methods inherited from interface org.norther.tammi.core.base.Refreshable
getRefreshed, refresh
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted, start, stop
 

Field Detail

EXT_INITIALIZER_CLASS_NAME

static final String EXT_INITIALIZER_CLASS_NAME
The connection initializer attribute.

See Also:
Constant Field Values

PERSISTER_CLASS_NAME

static final String PERSISTER_CLASS_NAME
The persister class name.

Method Detail

getConnectionDescriptor

JdbcConnectionDescriptor getConnectionDescriptor()
Gets the default connection descriptor from the repository.

Note that the descriptor is cloned from the original one.

Returns:
the class descriptor or null.

getConnectionDescriptor

JdbcConnectionDescriptor getConnectionDescriptor(String key)
Gets the connection descriptor of the specified connection from the repository.

Note that the descriptor is cloned from the original one.

Parameters:
key - the key i.e. the alias name of the connection.
Returns:
the class descriptor or null.

getConnectionDescriptor

JdbcConnectionDescriptor getConnectionDescriptor(String key,
                                                 String user,
                                                 String pswd)
Gets the connection descriptor of the specified connection for the given user from the repository.

Note that the descriptor is cloned from the original one.

Parameters:
key - the key i.e. the alias name of the connection.
user - the username of the connection.
pswd - the password of the connection.
Returns:
the class descriptor or null.

connectionDescriptorMap

Map connectionDescriptorMap()
Returns a map of defined connection descriptors.

Returns:
a map of connection descriptors with aliases as keys.

getConnectionPlatform

String getConnectionPlatform(String key)
Gets the DB platform of the specified connection.

Parameters:
key - the key i.e. the alias name of the connection.
Returns:
the DB platform or null if not mapped.

getClassDescriptor

ClassDescriptor getClassDescriptor(String className)
Gets the class descriptor of the specified class from the repository.

Parameters:
className - the name of the class.
Returns:
the class descriptor or null.

classDescriptorMap

Map classDescriptorMap()
Returns a map of defined class descriptors.

Returns:
a map of class descriptors with persistent classes as keys.

getFieldDescriptor

FieldDescriptor getFieldDescriptor(String className,
                                   String attribute)
Gets the field descriptor of the specified class and attribute from the repository.

Parameters:
className - the name of the class.
attribute - the name of the attribute.
Returns:
the field descriptor or null.

getLoggingFilePath

String getLoggingFilePath()
Gets the logging file path.

Returns:
the logging file path.

setLoggingFilePath

void setLoggingFilePath(String path)
Sets the logging file path. The path may be an absolute file path, a file path relative to the specified config key folder or a URL.

Parameters:
path - a logging file path.


Copyright © 2004 The Norther Organization. All rights reserved.