|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjnicli.DatabaseSessionServer
Database session client implementation. Server side implementation of DatabaseSession interface. It redirect methods to DatabaseJNI class.
Constructor Summary | |
DatabaseSessionServer()
|
Method Summary | |
long |
attach()
Attach thread to the database. |
void |
close(long session)
Close database |
void |
commit(long session)
Commit current transaction. |
int |
delete(long session,
java.lang.Class table,
java.lang.String condition)
Delete all objects from the table matching specified condition |
void |
detach(long session,
int flags)
Detach thread to the database. |
long |
insert(long session,
java.lang.Object obj)
Insert new object in the database. |
void |
lock(long session)
Lock database in exclusive mode. |
long |
open(int accessType,
java.lang.String databaseName,
java.lang.String databasePath,
long initSize,
int transactionCommitDelay)
Open database |
void |
rollback(long session)
Commit current transaction Transaction is implicitly started when any database operation is perfromed. |
Cursor |
select(long session,
java.lang.Class table,
java.lang.String condition,
int flags)
Select objects from table matching condition |
void |
update(long session,
long oid,
java.lang.Object obj)
Update object with soecified OID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatabaseSessionServer()
Method Detail |
public long open(int accessType, java.lang.String databaseName, java.lang.String databasePath, long initSize, int transactionCommitDelay)
DatabaseSession
open
in interface DatabaseSession
accessType
- database access type: one of READ_ONLY, READ_WRITE, CONCURRENT_READ or CONCURRENT_UPDATEdatabaseName
- database namedatabasePath
- path to the database fileinitSize
- initial size of databasetransactionCommitDelay
- transaction commit delay (specify 0 to disable)
public void close(long session)
DatabaseSession
close
in interface DatabaseSession
session
- session identifierpublic Cursor select(long session, java.lang.Class table, java.lang.String condition, int flags)
DatabaseSession
select
in interface DatabaseSession
session
- session identifiertable
- class corresponding to the tablecondition
- SubSQL condition (to select all records pass empty string)flags
- combination of FOR_UPDATE and AUTOCOMMIT flags
public void update(long session, long oid, java.lang.Object obj)
DatabaseSession
update
in interface DatabaseSession
session
- session identifieroid
- OID of updated objectobj
- updated objectpublic long insert(long session, java.lang.Object obj)
DatabaseSession
insert
in interface DatabaseSession
session
- session identifierobj
- inserted object
public int delete(long session, java.lang.Class table, java.lang.String condition)
DatabaseSession
delete
in interface DatabaseSession
session
- session identifiertable
- class corresponding to the tablecondition
- SubSQL condition (to delete all records pass empty string)
public void commit(long session)
DatabaseSession
commit
in interface DatabaseSession
session
- session identifierpublic void rollback(long session)
DatabaseSession
rollback
in interface DatabaseSession
session
- session identifierpublic void lock(long session)
DatabaseSession
lock
in interface DatabaseSession
session
- session identifierpublic long attach()
DatabaseSession
attach
in interface DatabaseSession
public void detach(long session, int flags)
DatabaseSession
detach
in interface DatabaseSession
flags
- combination of CLI_DETACH_COMMIT and CLI_DETACH_DESTROY_CONTEXT flagssession
- session identifier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |