Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enableit.db.daf.castor
Class CastorJdoDaf  view CastorJdoDaf download CastorJdoDaf.java

java.lang.Object
  extended byorg.enableit.db.daf.castor.CastorJdoDaf
All Implemented Interfaces:
org.enableit.db.daf.DataAbstractionFacade

public class CastorJdoDaf
extends java.lang.Object
implements org.enableit.db.daf.DataAbstractionFacade

Implementation of DataAbstractionFacade backed by Castor's JDO implementation.
Castor appears to handle encoding of Strings without any further work here.


Field Summary
protected static org.apache.log4j.Category logger
          The Log4J Category doing the logging.
 
Constructor Summary
CastorJdoDaf()
          Default constructor.
CastorJdoDaf(org.enableit.db.daf.conf.ProviderDetails pd)
          Constructor that sets the configuration.
 
Method Summary
 java.lang.Object create(java.lang.Object bean)
          Create a persistent copy of the received JavaBean.
 boolean exists(java.lang.Object bean)
          Test if the bean exists in the configured data store.
 java.lang.Object load(java.lang.Object bean)
           
 java.lang.Object modify(java.lang.Object bean)
           
 java.lang.Object remove(java.lang.Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Category logger
The Log4J Category doing the logging.

Constructor Detail

CastorJdoDaf

public CastorJdoDaf()
Default constructor.


CastorJdoDaf

public CastorJdoDaf(org.enableit.db.daf.conf.ProviderDetails pd)
Constructor that sets the configuration.

Method Detail

create

public java.lang.Object create(java.lang.Object bean)
                        throws org.enableit.db.daf.NotPersistedException
Create a persistent copy of the received JavaBean.

Specified by:
create in interface org.enableit.db.daf.DataAbstractionFacade

modify

public java.lang.Object modify(java.lang.Object bean)
                        throws org.enableit.db.daf.NotPersistedException
Specified by:
modify in interface org.enableit.db.daf.DataAbstractionFacade

remove

public java.lang.Object remove(java.lang.Object bean)
                        throws org.enableit.db.daf.NotPersistedException
Specified by:
remove in interface org.enableit.db.daf.DataAbstractionFacade

load

public java.lang.Object load(java.lang.Object bean)
                      throws org.enableit.db.daf.QueryException
Specified by:
load in interface org.enableit.db.daf.DataAbstractionFacade

exists

public boolean exists(java.lang.Object bean)
               throws org.enableit.db.daf.QueryException
Test if the bean exists in the configured data store.

If the bean implements org.enableit.db.daf.ComparableBean then the Persistent datastore will be queried for an entry that matches just those properties defined by the getEqualityPropertyList. Otherwise every accessible property will be used in the query.

Specified by:
exists in interface org.enableit.db.daf.DataAbstractionFacade