|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xorm.datastore.xml.JDOMDocumentDriver
A datastore driver that uses an XML document as the datastore. Datastore XML descriptor files need to specify a column named "." as the primary key column; table names should match element names. Data column names should be specified in a limited XPath notation. Examples are "@name", "description/text()", and ".." for a parent reference. This class relies on the transactional mechanics of the DocumentHolder class. At the beginning of each transaction, it acquires a document by calling checkout(); upon commit (but not rollback) it calls checkin().
Constructor Summary | |
JDOMDocumentDriver(DocumentHolder documentHolder)
Sets the data source, which must be an instance of DocumentHolder. |
Method Summary | |
void |
begin(boolean readOnly)
Begins a transaction by calling checkout on the DocumentHolder. |
void |
commit()
Calls checkin() on the DocumentHolder if any write operations were called during the transaction. |
int |
count(Selector selector)
Returns the size of the results that would be returned by the query. |
void |
create(Row row)
Creates (inserts) a new row in the datastore. |
void |
delete(Row row)
Permanently deletes a single row from the datastore. |
void |
rollback()
|
Collection |
select(Selector selector,
Set extraRows)
Selects from (queries) the datastore for rows matching the specified query conditions. |
void |
update(Row row)
Updates a given row so that the datastore's values are in sync with those in the object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDOMDocumentDriver(DocumentHolder documentHolder)
Method Detail |
public void begin(boolean readOnly)
begin
in interface DatastoreDriver
public void commit() throws DriverException
commit
in interface DatastoreDriver
DriverException
public void rollback()
rollback
in interface DatastoreDriver
public void create(Row row)
DatastoreDriver
create
in interface DatastoreDriver
public void update(Row row)
DatastoreDriver
update
in interface DatastoreDriver
public void delete(Row row)
DatastoreDriver
delete
in interface DatastoreDriver
public Collection select(Selector selector, Set extraRows)
DatastoreDriver
select
in interface DatastoreDriver
selector
- the root of the parse tree representing the queryextraRows
- a non-null set to which additional objects read
from the datastore can be added, as advised by fetch group
information and optimization choices.
public int count(Selector selector)
DatastoreDriver
count
in interface DatastoreDriver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |