|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zphinx.spine.data.AbstractDataProxy
public abstract class AbstractDataProxy
A skeleton class used to select a suitable data persistence object to use to process the request.Presently it provides definitions for 6 types of persistence systems i.e:
Copyright ©Zphinx Software Solutions
| Field Summary | |
|---|---|
static int |
DATA_DATABASE
The constant representing a database persistence system |
static int |
DATA_EJB
The constant representing a EJB based persistence system |
static int |
DATA_HIBERNATE
The constant representing an Hibernate driven persistence system |
static int |
DATA_JAVASPACE
The constant representing a JavaSpace/Jini persistence system |
static int |
DATA_LDAP
The constant representing an LDAP persistence system |
static int |
DATA_PROPERTIES_FILE
The constant representing a properties persistence system |
| Constructor Summary | |
|---|---|
AbstractDataProxy()
|
|
| Method Summary | |
|---|---|
abstract void |
close(DataAccessObject dao)
Close and dispose of all opened resources |
protected Object |
createDataAccessImpl(String className,
DAOInput daoCons)
Create an object which implements a DataAccessObject suitable for performing our data operations |
Object |
execute(DataAccessObject dao,
DataTransferObject obj)
Execute a process in the data storage object and return a suitable result object |
DataAccessObject |
getDataAccessObject()
Gets the currently active DataAccessObject associated with this proxy |
static AbstractDataProxy |
getInstance(int i)
The method which returns a handle to the relevant subclass |
protected int |
getStoreType()
Gets the type of persistence system in use by this system. |
boolean |
init(Object obj1,
String className,
DAOInput daoCons)
Initializes all the objects needed by this Abstract Factory, opens the necessary resource and throws an exception when it cannot find a persistence object |
protected abstract DataAccessObject |
open(Object obj,
String s,
DAOInput daoCons)
Open the datastore and fetch the correct type of persistence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DATA_PROPERTIES_FILE
public static final int DATA_DATABASE
public static final int DATA_EJB
public static final int DATA_JAVASPACE
public static final int DATA_LDAP
public static final int DATA_HIBERNATE
| Constructor Detail |
|---|
public AbstractDataProxy()
| Method Detail |
|---|
public final boolean init(Object obj1,
String className,
DAOInput daoCons)
throws SpineApplicationException
obj1 - A Suitable ObjectclassName - A String representing the type of DAO to create.daoCons - The DaoConstructor passed to this object
SpineApplicationException
protected abstract DataAccessObject open(Object obj,
String s,
DAOInput daoCons)
throws SpineApplicationException
obj - Arbitary object to pass to this methods - A String representing the type of DAO to create.daoCons - The DaoConstructor passed to this object
Throws - a SpineApplicationException if unable to load a the appropriate DataAbstract Object
SpineApplicationException
public final Object execute(DataAccessObject dao,
DataTransferObject obj)
dao - The DataAccessObject associated with this proxyobj - The object to be parsed by the DAO
SpineApplicationExceptionprotected int getStoreType()
public static final AbstractDataProxy getInstance(int i)
i - An int which represents the type of proxy we wish to create
public abstract void close(DataAccessObject dao)
throws SpineApplicationException
dao - The DataAccessObject associated with this proxy
SpineApplicationExceptionpublic DataAccessObject getDataAccessObject()
protected Object createDataAccessImpl(String className,
DAOInput daoCons)
className - A string representing the type of DataAccessObject we wish to createdaoCons - The DaoConstructor object used by the DAO to instantiate it's type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||