no.sintef.assetrepository.dao
Class AbstractDAO

java.lang.Object
  extended byno.sintef.assetrepository.dao.AbstractDAO
Direct Known Subclasses:
AssetRepresentationDAOImpl, AssetTypeDAOImpl, AssetVersionDAOImpl, VersionedAssetDAOImpl

public abstract class AbstractDAO
extends java.lang.Object

Author:
fvr To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Constructor Summary
AbstractDAO(java.lang.String collection)
           
 
Method Summary
protected  java.lang.Object create(javax.ejb.EntityBean ejb)
           
protected static no.sintef.assetrepository.jaxb.IOid createIOid(java.lang.String id)
           
protected abstract  java.lang.Object createJaxbObject(javax.ejb.EntityBean ejb)
           
protected  java.lang.Object findByPrimaryKey(java.lang.Object pk)
           
protected abstract  java.lang.String getId(java.lang.Object o)
           
protected abstract  java.lang.Object getPrimaryKey(java.lang.String id)
           
protected  java.util.Collection getPrimaryKeys(java.lang.String query)
           
protected abstract  java.lang.String getSingleResourceQuery(java.lang.String id)
           
 void init()
           
protected  void load(java.lang.Object pk, javax.ejb.EntityBean ejb)
           
protected  java.util.Collection oidsToPks(java.util.List oids, java.lang.Class pkClass)
           
protected  void pksToOids(java.util.Collection pks, java.util.List oids, java.lang.Class pkClass)
           
protected  void remove(java.lang.Object pk)
           
protected abstract  void setJaxbObject(javax.ejb.EntityBean ejb, java.lang.Object jaxbObject)
           
protected  void store(javax.ejb.EntityBean ejb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDAO

public AbstractDAO(java.lang.String collection)
Method Detail

init

public void init()

load

protected void load(java.lang.Object pk,
                    javax.ejb.EntityBean ejb)
             throws javax.ejb.EJBException
Parameters:
pk -
ejb -
Throws:
javax.ejb.EJBException

store

protected void store(javax.ejb.EntityBean ejb)
              throws javax.ejb.EJBException
Parameters:
ejb -
Throws:
javax.ejb.EJBException

remove

protected void remove(java.lang.Object pk)
               throws javax.ejb.RemoveException,
                      javax.ejb.EJBException
Parameters:
pk -
Throws:
javax.ejb.RemoveException
javax.ejb.EJBException

create

protected java.lang.Object create(javax.ejb.EntityBean ejb)
                           throws javax.ejb.CreateException,
                                  javax.ejb.EJBException
Parameters:
ejb -
Returns:
Throws:
javax.ejb.CreateException
javax.ejb.EJBException

findByPrimaryKey

protected java.lang.Object findByPrimaryKey(java.lang.Object pk)
                                     throws javax.ejb.FinderException
Parameters:
pk -
Returns:
Throws:
javax.ejb.FinderException

getPrimaryKeys

protected java.util.Collection getPrimaryKeys(java.lang.String query)
Parameters:
query -
Returns:

pksToOids

protected void pksToOids(java.util.Collection pks,
                         java.util.List oids,
                         java.lang.Class pkClass)

oidsToPks

protected java.util.Collection oidsToPks(java.util.List oids,
                                         java.lang.Class pkClass)

getId

protected abstract java.lang.String getId(java.lang.Object o)
Parameters:
o - The object containing the primary key. May be an Entity bean, primary key or JAXB object.
Returns:

getPrimaryKey

protected abstract java.lang.Object getPrimaryKey(java.lang.String id)
Parameters:
id - The primary key ID, never null.
Returns:

createJaxbObject

protected abstract java.lang.Object createJaxbObject(javax.ejb.EntityBean ejb)
Parameters:
ejb -
Returns:

setJaxbObject

protected abstract void setJaxbObject(javax.ejb.EntityBean ejb,
                                      java.lang.Object jaxbObject)
Parameters:
ejb -
jaxbObject -

getSingleResourceQuery

protected abstract java.lang.String getSingleResourceQuery(java.lang.String id)
Parameters:
id -
Returns:

createIOid

protected static final no.sintef.assetrepository.jaxb.IOid createIOid(java.lang.String id)
Parameters:
id -
Returns:


Copyright © 2003-2005 SINTEF. All Rights Reserved.