org.neodatis.odb
Interface ODBExt

All Known Implementing Classes:
ODBExtImpl

public interface ODBExt

An interface to provider extended access to ODB.

Author:
osmadja

Method Summary
 ExternalOID convertToExternalOID(OID oid)
          Convert an OID to External OID
 TransactionId getCurrentTransactionId()
          Gets the current transaction Id
 DatabaseId getDatabaseId()
          Get the Database ID
 long getObjectCreationDate(OID oid)
          Returns the object creation date in ms since 1/1/1970
 ExternalOID getObjectExternalOID(java.lang.Object object)
          Gets the external OID of an Object.
 long getObjectUpdateDate(OID oid, boolean useCache)
          Returns the object last update date in ms since 1/1/1970
 int getObjectVersion(OID oid, boolean useCache)
          Returns the object version of the object that has the specified OID
 OID replace(OID oid, java.lang.Object o)
          Replace the object with the specific OID by the object passed as a parameter
 

Method Detail

getObjectExternalOID

ExternalOID getObjectExternalOID(java.lang.Object object)
Gets the external OID of an Object. The external OID contains the ID of the database + the oid of the object. The External OID can be used to identify objects outside the ODB database as it should be unique across databases. It can be used for example to implement a replication process.

Parameters:
object -
Returns:

getDatabaseId

DatabaseId getDatabaseId()
Get the Database ID

Returns:

convertToExternalOID

ExternalOID convertToExternalOID(OID oid)
Convert an OID to External OID

Parameters:
oid -
Returns:
The external OID

getCurrentTransactionId

TransactionId getCurrentTransactionId()
Gets the current transaction Id

Returns:
The current transaction Id

getObjectVersion

int getObjectVersion(OID oid,
                     boolean useCache)
Returns the object version of the object that has the specified OID

Parameters:
oid -
useCache - if false, force a disk read. else use the version that has already been loaded in the cache
Returns:

getObjectCreationDate

long getObjectCreationDate(OID oid)
Returns the object creation date in ms since 1/1/1970

Parameters:
oid -
Returns:
The creation date

getObjectUpdateDate

long getObjectUpdateDate(OID oid,
                         boolean useCache)
Returns the object last update date in ms since 1/1/1970

Parameters:
oid -
useCache - if false, force a disk read. else use the date that has already been loaded in the cache
Returns:
The last update date

replace

OID replace(OID oid,
            java.lang.Object o)
Replace the object with the specific OID by the object passed as a parameter

Parameters:
oid -
o -
Returns: