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

java.lang.Object
  extended byorg.apache.ws.jaxme.pm.impl.PMImpl
      extended byorg.apache.ws.jaxme.pm.ino.api4j.TaminoAPI4JPm
All Implemented Interfaces:
PM

public class TaminoAPI4JPm
extends PMImpl

Author:
Jochen Wiedmann

Nested Class Summary
 
Nested classes 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()
           
 java.lang.String getJndiReference()
           
protected  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)
           
 void setJndiReference(java.lang.String pJndiReference)
           
 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

getCollection

public java.lang.String getCollection()

setCollection

public void setCollection(java.lang.String pCollection)

getJndiReference

public java.lang.String getJndiReference()

setJndiReference

public void setJndiReference(java.lang.String pJndiReference)

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
Throws:
JAXBException

getTXMLObject

protected TXMLObject getTXMLObject(InoObject pElement)

getTSAXObjectModel

protected TSAXObjectModel getTSAXObjectModel()
                                      throws JAXBException
Throws:
JAXBException

getTConnection

protected TConnection getTConnection()
                              throws javax.naming.NamingException,
                                     TServerNotAvailableException
Throws:
javax.naming.NamingException
TServerNotAvailableException

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