|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Manager is responsible for reading, inserting, updating and deleting documents.
Field Summary | |
static java.lang.Integer |
BIGINT
A placeholder type matching java.sql.Types.BIGINT. |
static java.lang.Integer |
BIT
A placeholder type matching java.sql.Types.BIT. |
static java.lang.Integer |
BLOB
Another placeholder type matching java.sql.Types.BLOB. |
static java.lang.Integer |
BOOLEAN
Another placeholder type matching java.sql.Types.BIT. |
static java.lang.Integer |
CLOB
A placeholder type matching java.sql.Types.CLOB. |
static java.lang.Integer |
DECIMAL
A placeholder type matching java.sql.Types.DECIMAL. |
static java.lang.Integer |
DOUBLE
A placeholder type matching java.sql.Types.DOUBLE. |
static java.lang.Integer |
FLOAT
A placeholder type matching java.sql.Types.FLOAT. |
static java.lang.Integer |
INTEGER
A placeholder type matching java.sql.Types.INTEGER. |
static java.lang.Integer |
SMALLINT
A placeholder type matching java.sql.Types.SHORTINT. |
static java.lang.Integer |
TIMESTAMP
A placeholder type matching java.sql.Types.TIMESTAMP. |
static java.lang.Integer |
TINYINT
A placeholder type matching java.sql.Types.TINYINT. |
static java.lang.Integer |
VARBINARY
A placeholder type matching java.sql.Types.VARBINARY. |
static java.lang.Integer |
VARCHAR
A placeholder type matching java.sql.Types.VARCHAR. |
Method Summary | |
JMAnyElement |
create()
Creates a new, empty element. |
void |
delete(JMAnyElement element)
Deletes the given document from the database. |
JMContentHandler |
getJMContentHandler()
Returns a JMContentHandler that can be used for parsing documents. |
java.lang.String |
getLocalName()
Returns the local name of the document type handled by this manager. |
java.lang.String |
getNamespaceURI()
Returns the namespace URI of the document type handled by this manager. |
void |
init(JMManagerFactory pFactory,
java.lang.String pNamespaceURI,
java.lang.String pLocalName)
Initializes the manager. |
void |
insert(JMAnyElement element)
Inserts the given document into the database. |
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[] pPlaceHolderArgs,
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 |
update(JMAnyElement element)
Updates the given document in the database. |
Field Detail |
public static final java.lang.Integer VARBINARY
A placeholder type matching java.sql.Types.VARBINARY.
public static final java.lang.Integer VARCHAR
A placeholder type matching java.sql.Types.VARCHAR.
public static final java.lang.Integer INTEGER
A placeholder type matching java.sql.Types.INTEGER.
public static final java.lang.Integer BIGINT
A placeholder type matching java.sql.Types.BIGINT.
public static final java.lang.Integer TINYINT
A placeholder type matching java.sql.Types.TINYINT.
public static final java.lang.Integer SMALLINT
A placeholder type matching java.sql.Types.SHORTINT.
public static final java.lang.Integer TIMESTAMP
A placeholder type matching java.sql.Types.TIMESTAMP.
public static final java.lang.Integer DOUBLE
A placeholder type matching java.sql.Types.DOUBLE.
public static final java.lang.Integer FLOAT
A placeholder type matching java.sql.Types.FLOAT.
public static final java.lang.Integer BIT
A placeholder type matching java.sql.Types.BIT.
public static final java.lang.Integer BOOLEAN
Another placeholder type matching java.sql.Types.BIT.
public static final java.lang.Integer DECIMAL
A placeholder type matching java.sql.Types.DECIMAL.
public static final java.lang.Integer BLOB
Another placeholder type matching java.sql.Types.BLOB.
public static final java.lang.Integer CLOB
A placeholder type matching java.sql.Types.CLOB.
Method Detail |
public void init(JMManagerFactory pFactory, java.lang.String pNamespaceURI, java.lang.String pLocalName) throws org.xml.sax.SAXException
Initializes the manager.
org.xml.sax.SAXException
public java.lang.String getNamespaceURI()
Returns the namespace URI of the document type handled by this manager.
public java.lang.String getLocalName()
Returns the local name of the document type handled by this manager.
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.
pObserver
- 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});
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.
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.
pObserver
- 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 void select(Observer pObserver, java.lang.String pQuery, java.lang.Object[] pPlaceHolderArgs, 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.
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);
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.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.
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, 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);
pQuery
- 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.
pQuery
- 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);
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 insert(JMAnyElement element) throws org.xml.sax.SAXException
Inserts the given document into the database.
org.xml.sax.SAXException
public void update(JMAnyElement element) throws org.xml.sax.SAXException
Updates the given document in the database.
org.xml.sax.SAXException
public void delete(JMAnyElement element) throws org.xml.sax.SAXException
Deletes the given document from the database.
org.xml.sax.SAXException
public JMAnyElement create() throws org.xml.sax.SAXException
Creates a new, empty element.
org.xml.sax.SAXException
public JMContentHandler getJMContentHandler() throws org.xml.sax.SAXException
Returns a JMContentHandler that can be used for parsing documents.
org.xml.sax.SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |