org.apache.ws.jaxme.pm.ino.api4j
Class TaminoAPI4JPm

java.lang.Object
  extended by org.apache.ws.jaxme.pm.impl.PMImpl
      extended by org.apache.ws.jaxme.pm.ino.api4j.TaminoAPI4JPm
All Implemented Interfaces:
PM
Direct Known Subclasses:
TaminoAPI4JDbPm, TaminoAPI4JRaPm

public abstract class TaminoAPI4JPm
extends PMImpl

Common base class for TaminoAPI4JRaPm, and TaminoAPI4JDbPm.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.ws.jaxme.pm.impl.PMImpl
PMImpl.ListObserver
 
Constructor Summary
TaminoAPI4JPm()
           
 
Method Summary
 void delete(Element pElement)
          Deletes the given document from the database.
 java.lang.String getCollection()
          Returns the Tamino database collection.
protected abstract  TConnection getTConnection()
           
protected  TSAXObjectModel getTSAXObjectModel()
           
protected  TXMLObject getTXMLObject(InoObject pElement)
           
 void init(JMManager pManager)
          Initializes the PM.
 void insert(Element pElement)
          Inserts the given document into the database.
 void select(Observer pObserver, java.lang.String pQuery, PMParams pParams)
          Reads documents matching the given query.
 void setCollection(java.lang.String pCollection)
          Sets the Tamino database collection.
 void update(Element pElement)
          Updates the given document in the database.
 
Methods inherited from class org.apache.ws.jaxme.pm.impl.PMImpl
create, getManager, parseQuery, select, select, select
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaminoAPI4JPm

public TaminoAPI4JPm()
Method Detail

init

public void init(JMManager pManager)
          throws JAXBException
Description copied from interface: PM

Initializes the PM. Called from the JAXBContextImpl upon initialization.

Specified by:
init in interface PM
Overrides:
init in class PMImpl
Parameters:
pManager - The manager being queried for configuration details.
Throws:
JAXBException

getCollection

public java.lang.String getCollection()
Returns the Tamino database collection.


setCollection

public void setCollection(java.lang.String pCollection)
Sets the Tamino database collection.


getTXMLObject

protected TXMLObject getTXMLObject(InoObject pElement)

getTSAXObjectModel

protected TSAXObjectModel getTSAXObjectModel()
                                      throws JAXBException
Throws:
JAXBException

getTConnection

protected abstract TConnection getTConnection()
                                       throws PMException
Throws:
PMException

select

public void select(Observer pObserver,
                   java.lang.String pQuery,
                   PMParams pParams)
            throws PMException
Description copied from interface: PM

Reads documents matching the given query. For any document matching, the Observer's notify method is executed with the matching document as an argument.

The query may contain placeholders. If it does, you have to supply an instance of PMParams with the placeholder values. Example:

   manager.select("Name = ? and Id = ?",
                  new PMParams().addString("Someone").addInt(4));
 

Parameters:
pObserver - This Observer is notified for any matching document. The document is added as an argument.
pQuery - The query to perform. May contain placeholders.
pParams - An array of objects or null, if the query doesn't contain any placeholders.
Throws:
PMException

insert

public void insert(Element pElement)
            throws PMException
Description copied from interface: PM

Inserts the given document into the database.

Throws:
PMException

update

public void update(Element pElement)
            throws PMException
Description copied from interface: PM

Updates the given document in the database.

Throws:
PMException

delete

public void delete(Element pElement)
            throws PMException
Description copied from interface: PM

Deletes the given document from the database.

Throws:
PMException