gov.bnl.gums.persistence
Class PersistenceFactory

java.lang.Object
  extended by gov.bnl.gums.persistence.PersistenceFactory
Direct Known Subclasses:
HibernatePersistenceFactory, LDAPPersistenceFactory, LocalPersistenceFactory

public abstract class PersistenceFactory
extends java.lang.Object

Represent a factory for all the classes that take care of the persistance of the AccountMappers, the UserGroups or any other components.

Implementing a new PersistanceManager class allows to complete redefined how the user, group and accounting information is stored. This will allow to keep the information integrated in the site accounting system, being it any RDBMS, LDAP, or even a combination of these.

It also allow to use different mapping technologies, allowing to use either entity beans, simple JDBC, Hibernate or any other favourite technology.

Author:
Gabriele Carcassi, Jay Packard

Constructor Summary
PersistenceFactory()
          Create a persistence factory.
PersistenceFactory(Configuration configuration)
          Create a persistence factory with a configuration.
PersistenceFactory(Configuration configuration, java.lang.String name)
          Create a persistence factory with a configuration and a name.
 
Method Summary
abstract  PersistenceFactory clone(Configuration configuration)
          Create a clone of itself
 Configuration getConfiguration()
          Getter for property configuration.
 java.lang.String getDescription()
          Getter for property description.
 java.lang.String getName()
          Getter for property name.
 java.util.Properties getProperties()
          Getter for the list of properties for the particular technology deployed by the inhereted classes.
 java.lang.String getType()
           
static java.lang.String getTypeStatic()
           
abstract  AccountPoolMapperDB retrieveAccountPoolMapperDB(java.lang.String name)
           
abstract  ManualAccountMapperDB retrieveManualAccountMapperDB(java.lang.String name)
           
abstract  ManualUserGroupDB retrieveManualUserGroupDB(java.lang.String name)
           
abstract  UserGroupDB retrieveUserGroupDB(java.lang.String name)
           
 void setConfiguration(Configuration configuration)
          Setter for property configuration.
 void setDescription(java.lang.String description)
          Setter for property description.
 void setName(java.lang.String name)
          Setter for property name.
 void setProperties(java.util.Properties properties)
          Setter for the list of properties for the particular technology deployed by the inhereted classes.
abstract  java.lang.String toXML()
          Get XML representation of this object for writing to gums.config
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceFactory

public PersistenceFactory()
Create a persistence factory. This empty constructor is needed by the XML Digestor.


PersistenceFactory

public PersistenceFactory(Configuration configuration)
Create a persistence factory with a configuration.

Parameters:
configuration -

PersistenceFactory

public PersistenceFactory(Configuration configuration,
                          java.lang.String name)
Create a persistence factory with a configuration and a name.

Parameters:
configuration -
name -
Method Detail

getTypeStatic

public static java.lang.String getTypeStatic()
Returns:
user friendly string representation of the property type called statically

clone

public abstract PersistenceFactory clone(Configuration configuration)
Create a clone of itself

Parameters:
configuration -
Returns:

getConfiguration

public Configuration getConfiguration()
Getter for property configuration.

Returns:
Value of property configuration.

getDescription

public java.lang.String getDescription()
Getter for property description.

Returns:
Value of property description.

getName

public java.lang.String getName()
Getter for property name.

Returns:
Value of property name.

getProperties

public java.util.Properties getProperties()
Getter for the list of properties for the particular technology deployed by the inhereted classes.

Returns:
properties.

getType

public java.lang.String getType()
Returns:
string representation of type of persistence factory

retrieveAccountPoolMapperDB

public abstract AccountPoolMapperDB retrieveAccountPoolMapperDB(java.lang.String name)

retrieveManualAccountMapperDB

public abstract ManualAccountMapperDB retrieveManualAccountMapperDB(java.lang.String name)

retrieveManualUserGroupDB

public abstract ManualUserGroupDB retrieveManualUserGroupDB(java.lang.String name)

retrieveUserGroupDB

public abstract UserGroupDB retrieveUserGroupDB(java.lang.String name)

setConfiguration

public void setConfiguration(Configuration configuration)
Setter for property configuration.

Parameters:
configuration. -

setDescription

public void setDescription(java.lang.String description)
Setter for property description.

Parameters:
description. -

setName

public void setName(java.lang.String name)
Setter for property name.

Parameters:
name. -

setProperties

public void setProperties(java.util.Properties properties)
Setter for the list of properties for the particular technology deployed by the inhereted classes.

Parameters:
properties. -

toXML

public abstract java.lang.String toXML()
Get XML representation of this object for writing to gums.config

Returns:
xml as string


Copyright © 2004-2008. All Rights Reserved.