com.zphinx.spine.data
Class DataAbstract

java.lang.Object
  extended by com.zphinx.spine.data.DataAbstract
All Implemented Interfaces:
DataAccessObject
Direct Known Subclasses:
AbstractDataBaseDAO, AbstractFileDAO, AbstractHibernateDAO, AbstractLdapDAO, EjbAbstract

public abstract class DataAbstract
extends Object
implements DataAccessObject

DataAbstract is an implementation of the DataAccessObject which contains base implementations of some the methods in a DataAccessObject.

Version:
1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo
See Also:
AbstractDataBaseDAO, AbstractFileDAO

Constructor Summary
DataAbstract()
           
 
Method Summary
abstract  boolean close()
          Call all the actions to be performed before closing the datastore
abstract  Object fetchData(DataTransferObject obj)
          Open a connection to the data storage system and return a suitable object
 String getErrors()
          Get the total errors generated by this implementation
 int getStoreType()
          The type of persistence system in use by this system.
 void setErrors(String error)
          Set the errors generated by this implementation
protected  void setStoreType(int storeType)
          Sets the type of data storage system to use with this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataAbstract

public DataAbstract()
Method Detail

fetchData

public abstract Object fetchData(DataTransferObject obj)
Description copied from interface: DataAccessObject
Open a connection to the data storage system and return a suitable object

Specified by:
fetchData in interface DataAccessObject
Parameters:
obj - A DataTransferObject to parse
Returns:
A value object containing data

getErrors

public String getErrors()
Description copied from interface: DataAccessObject
Get the total errors generated by this implementation

Specified by:
getErrors in interface DataAccessObject
Returns:
The concatenation of all the generated errors

setErrors

public void setErrors(String error)
Description copied from interface: DataAccessObject
Set the errors generated by this implementation

Specified by:
setErrors in interface DataAccessObject
Parameters:
error - The error to add to the total errors

getStoreType

public final int getStoreType()
Description copied from interface: DataAccessObject
The type of persistence system in use by this system. Presently properties and database.

Specified by:
getStoreType in interface DataAccessObject
Returns:
The concatenation of all the generated errors

close

public abstract boolean close()
Description copied from interface: DataAccessObject
Call all the actions to be performed before closing the datastore

Specified by:
close in interface DataAccessObject
Returns:
True if the operation succeeds

setStoreType

protected void setStoreType(int storeType)
Sets the type of data storage system to use with this object

Parameters:
storeType - The storeType to set.