org.xorm.datastore
Interface DatastoreDriver

All Known Implementing Classes:
BaseSQLDriver, HeapDriver, JDOMDocumentDriver

public interface DatastoreDriver

There is one datastore driver per Transaction.


Method Summary
 void begin(boolean readOnly)
           
 void commit()
           
 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.
 

Method Detail

begin

public void begin(boolean readOnly)
           throws DriverException
DriverException

commit

public void commit()
            throws DriverException
DriverException

rollback

public void rollback()
              throws DriverException
DriverException

create

public void create(Row row)
            throws DriverException
Creates (inserts) a new row in the datastore. If the table is configured for autoincrement or sequence ID generation, the object ID is generated using that method before the row is inserted.

DriverException

update

public void update(Row row)
            throws DriverException
Updates a given row so that the datastore's values are in sync with those in the object.

DriverException

delete

public void delete(Row row)
            throws DriverException
Permanently deletes a single row from the datastore.

DriverException

select

public Collection select(Selector selector,
                         Set extraRows)
                  throws DriverException
Selects from (queries) the datastore for rows matching the specified query conditions.

Parameters:
selector - the root of the parse tree representing the query
extraRows - a non-null set to which additional objects read from the datastore can be added, as advised by fetch group information and optimization choices.
Returns:
a collection of Row objects matching the selection criteria.
DriverException

count

public int count(Selector selector)
          throws DriverException
Returns the size of the results that would be returned by the query. A naive implementation would be to return select(selector, ...).size(). However, this allows datastores that provide a native count feature to use far less network and memory resources.

DriverException


$Header: /cvsroot/xorm/xorm/docs/api/org/xorm/datastore/DatastoreDriver.html,v 1.9 2004/05/30 08:55:05 wbiggs Exp $