|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ispsoft.jaxme.JMManagerImpl de.ispsoft.jaxme.JMFileManager
Although the name suggests different, this is not a true JMManager, but just a set of shortcuts that simplify reading from and writing to files.
Nested Class Summary |
Nested classes inherited from class de.ispsoft.jaxme.JMManagerImpl |
JMManagerImpl.MyObserver |
Field Summary | |
protected java.lang.String |
fileName
|
Fields inherited from class de.ispsoft.jaxme.JMManagerImpl |
ELEMENT_CLASS_NAME, HANDLER_CLASS_NAME, jmAnyElementClass, 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 | |
JMFileManager()
Creates a new instance of JMFileManager |
Method Summary | |
void |
delete(JMAnyElement pElement)
Not implemented, throws a SAXException. |
java.lang.String |
getFileName()
Returns the filename to use for the insert() and
update() methods. |
void |
insert(JMAnyElement pElement)
Inserts the given element into the file. |
void |
insert(java.lang.String pFileName,
JMAnyElement pElement)
Inserts the given element into the given file. |
void |
select(Observer pObserver,
java.lang.String pFileName,
java.lang.Object[] pPlaceHolderArgs,
int pStart,
int pMax)
Reads documents from the given file. |
void |
setFileName(java.lang.String pFileName)
Sets the filename to use for the insert() and
update() methods. |
void |
setJMAnyElementClass(java.lang.Class pElementClass)
Sets the JMAnyElement class for reading elements. |
void |
setJMContentHandlerClass(java.lang.Class pHandlerClass)
Sets the JMContentHandler class for reading elements. |
void |
update(JMAnyElement pElement)
Updates the file with the contents of the given element. |
void |
update(java.lang.String pFileName,
JMAnyElement pElement)
Updates the given file with the contents of the given element. |
Methods inherited from class de.ispsoft.jaxme.JMManagerImpl |
create, getJMAnyElementClass, getJMContentHandler, getLocalName, getNamespaceSupport, getNamespaceURI, init, parseConfiguration, select, select, select, select, select, select, select, toSAX, toWriter, toXML |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String fileName
Constructor Detail |
public JMFileManager()
Method Detail |
public void setJMContentHandlerClass(java.lang.Class pHandlerClass)
Sets the JMContentHandler class for reading elements.
public void setJMAnyElementClass(java.lang.Class pElementClass)
Sets the JMAnyElement class for reading elements.
public void select(Observer pObserver, java.lang.String pFileName, java.lang.Object[] pPlaceHolderArgs, int pStart, int pMax) throws org.xml.sax.SAXException
Reads documents from the given file.
select
in interface JMManager
select
in class JMManagerImpl
pObserver
- The observer to notify about documents that
have been readpFileName
- The file name to read frompPlaceHolderArgs
- Must be null, as this manager doesn't
support placeholderspStart
- Number of documents to skip at the beginning;
0 for all documentspMax
- Maximum number of documents to read, excluding
skipped documents, 0 for all documents
org.xml.sax.SAXException
public void setFileName(java.lang.String pFileName)
Sets the filename to use for the insert()
and
update()
methods.
public java.lang.String getFileName()
Returns the filename to use for the insert()
and
update()
methods.
public void insert(JMAnyElement pElement) throws org.xml.sax.SAXException
Inserts the given element into the file. If the file does not yet exist, it is created. Otherwise, it will be overwritten.
insert
in interface JMManager
insert
in class JMManagerImpl
org.xml.sax.SAXException
public void insert(java.lang.String pFileName, JMAnyElement pElement) throws org.xml.sax.SAXException
Inserts the given element into the given file. If the file does not yet exist, it is created. Otherwise, it will be overwritten.
org.xml.sax.SAXException
public void update(JMAnyElement pElement) throws org.xml.sax.SAXException
Updates the file with the contents of the given element. If the file does not yet exist, a SAXException is thrown.
update
in interface JMManager
update
in class JMManagerImpl
org.xml.sax.SAXException
public void update(java.lang.String pFileName, JMAnyElement pElement) throws org.xml.sax.SAXException
Updates the given file with the contents of the given element. If the file does not yet exist, a SAXException is thrown.
org.xml.sax.SAXException
public void delete(JMAnyElement pElement) throws org.xml.sax.SAXException
Not implemented, throws a SAXException.
delete
in interface JMManager
delete
in class JMManagerImpl
org.xml.sax.SAXException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |