public class InoManager extends PMIdImpl
An implementation of a JMManager for a Tamino database.
PMImpl.ListObserver| Constructor and Description |
|---|
InoManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Element pElement)
Deletes the given document from the database.
|
protected java.lang.String |
getDeleteQuery(Element pElement)
Returns a query suited for deleting the element.
|
java.lang.String |
getElementTag()
Returns the qualified element name of the root element.
|
java.lang.String |
getIdTag()
Returns the qualified attribute name of the ID attribute.
|
protected java.lang.String |
getInsertQuery(Element pElement)
Returns a query suited for inserting the element.
|
protected java.lang.String |
getPassword() |
protected java.net.HttpURLConnection |
getResponse(java.lang.String pQuery)
Performs a single database query.
|
protected java.lang.String |
getUpdateQuery(Element pElement)
Returns a query suited for updating the element.
|
protected java.lang.String |
getUser() |
void |
init(JMManager pManager)
Initializes the PM.
|
void |
insert(Element pElement)
Inserts the given document into the database.
|
protected void |
performQuery(java.lang.String pQuery,
InoResponseHandler pHandler)
Parses a single INO response document.
|
protected InoResponseHandler |
performQuery(java.lang.String pQuery,
java.util.List pList)
Performs a single database query.
|
void |
select(Observer pObserver,
java.lang.String pQuery,
PMParams pPlaceHolderArgs)
Reads documents matching the given query.
|
void |
setElementTag(java.lang.String pElementTag)
Sets the qualified element name of the root element.
|
void |
setIdTag(java.lang.String pIdTag)
Returns the qualified attribute name of the ID attribute.
|
void |
update(Element pElement)
Updates the given document in the database.
|
getGetIdMethodName, getId, setGetIdMethodNamecreate, getManager, parseQuery, select, select, selectprotected java.lang.String getUser()
protected java.lang.String getPassword()
public java.lang.String getElementTag()
public void setElementTag(java.lang.String pElementTag)
public java.lang.String getIdTag()
public void setIdTag(java.lang.String pIdTag)
public void init(JMManager pManager) throws JAXBException
PMInitializes the PM. Called from the
JAXBContextImpl upon initialization.
init in interface PMinit in class PMIdImplpManager - The manager being queried for configuration details.JAXBExceptionprotected java.lang.String getDeleteQuery(Element pElement) throws JAXBException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException, java.lang.NoSuchMethodException, java.io.UnsupportedEncodingException
Returns a query suited for deleting the element.
JAXBExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionjava.lang.NoSuchMethodExceptionjava.io.UnsupportedEncodingExceptionprotected java.lang.String getUpdateQuery(Element pElement) throws JAXBException, java.io.UnsupportedEncodingException
Returns a query suited for updating the element.
JAXBExceptionjava.io.UnsupportedEncodingExceptionprotected java.lang.String getInsertQuery(Element pElement) throws JAXBException, java.io.UnsupportedEncodingException
Returns a query suited for inserting the element.
JAXBExceptionjava.io.UnsupportedEncodingExceptionprotected java.net.HttpURLConnection getResponse(java.lang.String pQuery)
throws org.xml.sax.SAXException
Performs a single database query.
org.xml.sax.SAXExceptionprotected InoResponseHandler performQuery(java.lang.String pQuery, java.util.List pList) throws org.xml.sax.SAXException
Performs a single database query.
org.xml.sax.SAXExceptionprotected void performQuery(java.lang.String pQuery,
InoResponseHandler pHandler)
throws org.xml.sax.SAXException
Parses a single INO response document.
org.xml.sax.SAXExceptionpublic void select(Observer pObserver, java.lang.String pQuery, PMParams pPlaceHolderArgs) throws JAXBException
PMReads 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));
pObserver - This Observer is notified for any matching document.
The document is added as an argument.pQuery - The query to perform. May contain placeholders.pPlaceHolderArgs - An array of objects or null, if the
query doesn't contain any placeholders.JAXBExceptionpublic void insert(Element pElement) throws PMException
PMInserts the given document into the database.
PMExceptionpublic void update(Element pElement) throws PMException
PMUpdates the given document in the database.
PMExceptionpublic void delete(Element pElement) throws PMException
PMDeletes the given document from the database.
PMException