|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.ispsoft.jaxme.JMManagerImpl
A default implementation for managers.
| Nested Class Summary | |
protected class |
JMManagerImpl.MyObserver
|
| Field Summary | |
static java.lang.String |
ELEMENT_CLASS_NAME
The local name of the ElementClass element. |
static java.lang.String |
HANDLER_CLASS_NAME
The local name of the HandlerClass element. |
protected java.lang.Class |
jmAnyElementClass
|
protected java.lang.Class |
jmContentHandlerClass
|
| Fields inherited from interface de.ispsoft.jaxme.JMManager |
BIGINT, BIT, BLOB, BOOLEAN, CLOB, DECIMAL, DOUBLE, FLOAT, INTEGER, SMALLINT, TIMESTAMP, TINYINT, VARBINARY, VARCHAR |
| Constructor Summary | |
JMManagerImpl()
Creates a new instance of JMManagerImpl. |
|
| Method Summary | |
JMAnyElement |
create()
Creates a new, empty element. |
void |
delete(JMAnyElement pElement)
Deletes the given document from the database. |
java.lang.Class |
getJMAnyElementClass()
Returns the JMAnyElement class handled by this Manager. |
JMContentHandler |
getJMContentHandler()
Returns a JMContentHandler that can be used for parsing documents. |
java.lang.String |
getLocalName()
Returns the managers local name. |
NamespaceSupport |
getNamespaceSupport()
Returns a NamespaceSupport object initialized with the URI's and prefixes from the "Namespaces" configuration. |
java.lang.String |
getNamespaceURI()
Returns the managers namespace URI. |
void |
init(JMManagerFactory pFactory,
java.lang.String pNamespaceURI,
java.lang.String pLocalName)
Initializes the manager. |
void |
insert(JMAnyElement pElement)
Inserts the given document into the database. |
void |
parseConfiguration(org.w3c.dom.Element pElement)
Parses a configuration element. |
void |
select(Observer pObserver,
java.lang.String pQuery)
Reads documents matching the given query. |
void |
select(Observer pObserver,
java.lang.String pQuery,
int pStart,
int pMax)
Reads documents matching the given query. |
void |
select(Observer pObserver,
java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs)
Reads documents matching the given query. |
void |
select(Observer pObserver,
java.lang.String pQuery,
java.lang.Object[] pPlaceHolders,
int pStart,
int pMax)
Reads documents matching the given query. |
java.util.Iterator |
select(java.lang.String pQuery)
Returns an iterator to all documents matching the given query. |
java.util.Iterator |
select(java.lang.String pQuery,
int pStart,
int pMax)
Returns an iterator to all documents matching the given query. |
java.util.Iterator |
select(java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs)
Returns an iterator to all documents matching the given query. |
java.util.Iterator |
select(java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs,
int pStart,
int pMax)
Returns an iterator to all documents matching the given query. |
void |
toSAX(JMAnyElement pElement,
org.xml.sax.ContentHandler pContentHandler)
Serializes an element to a SAX ContentHandler using the configured prefix settings. |
void |
toWriter(JMAnyElement pElement,
java.io.Writer pWriter)
Serializes an element to a SAX ContentHandler using the configured prefix settings. |
java.lang.String |
toXML(JMAnyElement pElement)
Serializes an element to a String using the configured prefix settings. |
void |
update(JMAnyElement pElement)
Updates the given document in the database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ELEMENT_CLASS_NAME
The local name of the ElementClass element.
public static final java.lang.String HANDLER_CLASS_NAME
The local name of the HandlerClass element.
protected java.lang.Class jmAnyElementClass
protected java.lang.Class jmContentHandlerClass
| Constructor Detail |
public JMManagerImpl()
| Method Detail |
public void parseConfiguration(org.w3c.dom.Element pElement)
Parses a configuration element. This method is called twice: Once for the default configuration and once for the specific configuration.
public void init(JMManagerFactory pFactory,
java.lang.String pNamespaceURI,
java.lang.String pLocalName)
throws org.xml.sax.SAXException
init in interface JMManagerorg.xml.sax.SAXExceptionpublic java.lang.String getNamespaceURI()
Returns the managers namespace URI.
getNamespaceURI in interface JMManagerpublic java.lang.String getLocalName()
Returns the managers local name.
getLocalName in interface JMManagerpublic java.lang.Class getJMAnyElementClass()
Returns the JMAnyElement class handled by this Manager.
public JMAnyElement create()
throws org.xml.sax.SAXException
Creates a new, empty element.
create in interface JMManagerorg.xml.sax.SAXException
public JMContentHandler getJMContentHandler()
throws org.xml.sax.SAXException
Returns a JMContentHandler that can be used for parsing documents.
getJMContentHandler in interface JMManagerorg.xml.sax.SAXException
public void select(Observer pObserver,
java.lang.String pQuery)
throws org.xml.sax.SAXException
Reads documents matching the given query. For any document matching, the Observer's notify method is executed with the matching document as an argument.
select in interface JMManagerpObserver - This Observer is notified for any matching document.
The document is added as an argument.pQuery - The query to perform.
org.xml.sax.SAXException
public void select(Observer pObserver,
java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs)
throws org.xml.sax.SAXException
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 object array with two elements per placeholder: An Integer with a java.sql.Types type and the actual placeholder value. Example:
manager.select("Name = ? and Id = ?",
new Object[]{JMManager.VARCHAR,
"Someone",
JMManager.INTEGER,
4});
select in interface JMManagerpObserver - 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.
org.xml.sax.SAXException
public void select(Observer pObserver,
java.lang.String pQuery,
int pStart,
int pMax)
throws org.xml.sax.SAXException
Reads documents matching the given query. For any document matching, the Observer's notify method is executed with the matching document as an argument.
select in interface JMManagerpObserver - This Observer is notified for any matching document.
The document is added as an argument.pQuery - The query to perform.pStart - Ignore the given number of result documents at the
beginning. A value of zero will return all documents.pMax - Return at most the given number of documents. A value
of zero will return all documents.
org.xml.sax.SAXException
public java.util.Iterator select(java.lang.String pQuery,
int pStart,
int pMax)
throws org.xml.sax.SAXException
Returns an iterator to all documents matching the given query.
select in interface JMManagerpQuery - The query to perform.pStart - Ignore the given number of result documents at the
beginning. A value of zero will return all documents.pMax - Return at most the given number of documents. A value
of zero will return all documents.
org.xml.sax.SAXException
public java.util.Iterator select(java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs,
int pStart,
int pMax)
throws org.xml.sax.SAXException
Returns an iterator to all documents matching the given query. The query may contain placeholders. If it does, you have to supply an object array with two elements per placeholder: An Integer with a java.sql.Types type and the actual placeholder value. Example:
manager.select("Name = ? and Id = ?",
new Object[]{JMManager.VARCHAR,
"Someone",
JMManager.INTEGER,
4}, 0, 0);
select in interface JMManagerpQuery - The query to perform. May contain placeholders.pPlaceHolderArgs - An array of objects or null, if the
query doesn't contain any placeholders.pStart - Ignore the given number of result documents at the
beginning. A value of zero will return all documents.pMax - Return at most the given number of documents. A value
of zero will return all documents.
org.xml.sax.SAXException
public java.util.Iterator select(java.lang.String pQuery)
throws org.xml.sax.SAXException
Returns an iterator to all documents matching the given query.
select in interface JMManagerpQuery - The query to perform.
org.xml.sax.SAXException
public java.util.Iterator select(java.lang.String pQuery,
java.lang.Object[] pPlaceHolderArgs)
throws org.xml.sax.SAXException
Returns an iterator to all documents matching the given query. The query may contain placeholders. If it does, you have to supply an object array with two elements per placeholder: An Integer with a java.sql.Types type and the actual placeholder value. Example:
manager.select("Name = ? and Id = ?",
new Object[]{JMManager.VARCHAR,
"Someone",
JMManager.INTEGER,
4}, 0, 0);
select in interface JMManagerpQuery - The query to perform. May contain placeholders.pPlaceHolderArgs - An array of objects or null, if the
query doesn't contain any placeholders.
org.xml.sax.SAXException
public NamespaceSupport getNamespaceSupport()
throws org.xml.sax.SAXException
Returns a NamespaceSupport object initialized with the URI's and prefixes from the "Namespaces" configuration.
org.xml.sax.SAXException
public void toSAX(JMAnyElement pElement,
org.xml.sax.ContentHandler pContentHandler)
throws org.xml.sax.SAXException
Serializes an element to a SAX ContentHandler using the configured prefix settings.
org.xml.sax.SAXException
public void toWriter(JMAnyElement pElement,
java.io.Writer pWriter)
throws org.xml.sax.SAXException,
java.io.IOException
Serializes an element to a SAX ContentHandler using the configured prefix settings.
org.xml.sax.SAXException
java.io.IOException
public java.lang.String toXML(JMAnyElement pElement)
throws org.xml.sax.SAXException
Serializes an element to a String using the configured prefix settings.
org.xml.sax.SAXException
public void select(Observer pObserver,
java.lang.String pQuery,
java.lang.Object[] pPlaceHolders,
int pStart,
int pMax)
throws org.xml.sax.SAXException
JMManagerReads 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 object array with two elements per placeholder: An Integer with a java.sql.Types type and the actual placeholder value. Example:
manager.select("Name = ? and Id = ?",
new Object[]{JMManager.VARCHAR,
"Someone",
JMManager.INTEGER,
4}, 0, 0);
select in interface JMManagerpObserver - This Observer is notified for any matching document.
The document is added as an argument.pQuery - The query to perform. May contain placeholders.pPlaceHolders - An array of objects or null, if the
query doesn't contain any placeholders.pStart - Ignore the given number of result documents at the
beginning. A value of zero will return all documents.pMax - Return at most the given number of documents. A value
of zero will return all documents.
org.xml.sax.SAXException
public void delete(JMAnyElement pElement)
throws org.xml.sax.SAXException
JMManagerDeletes the given document from the database.
delete in interface JMManagerorg.xml.sax.SAXException
public void update(JMAnyElement pElement)
throws org.xml.sax.SAXException
JMManagerUpdates the given document in the database.
update in interface JMManagerorg.xml.sax.SAXException
public void insert(JMAnyElement pElement)
throws org.xml.sax.SAXException
JMManagerInserts the given document into the database.
insert in interface JMManagerorg.xml.sax.SAXException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||