com.sparsity.dex.gdb
Class Database

java.lang.Object
  extended by com.sparsity.dex.gdb.Database
All Implemented Interfaces:
java.io.Closeable

public class Database
extends java.lang.Object
implements java.io.Closeable

Database class.

All the data of the Database is stored into a persistent file which just can be created or open through a Dex instance.

Also, all the manipulation of a Database must be done by means of a Session which can be initiated from a Database instance.

Multiple Databases do not share the memory, that is there is no negotiation among them. In those cases, memory must be prefixed for each Database. To do that, use the DEXConfig.

Author:
Sparsity Technologies http://www.sparsity-technologies.com

Method Summary
 void close()
          Closes the Database instance.
 java.lang.String getAlias()
          Gets the alias of the Database.
 java.lang.String getPath()
          Gets the path of the Database.
 void getStatistics(DatabaseStatistics stats)
          Gets Database statistics.
 boolean isClosed()
          Gets if Database instance has been closed or not.
 Session newSession()
          Creates a new Session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAlias

public java.lang.String getAlias()
Gets the alias of the Database.

Returns:
The alias of the Database.

getPath

public java.lang.String getPath()
Gets the path of the Database.

Returns:
The path of the Database.

newSession

public Session newSession()
Creates a new Session.


isClosed

public boolean isClosed()
Gets if Database instance has been closed or not.

Returns:
TRUE if the Database instance has been closed, FALSE otherwise.
See Also:
close()

close

public void close()
Closes the Database instance.

It must be called to ensure the integrity of all data.

Specified by:
close in interface java.io.Closeable

getStatistics

public void getStatistics(DatabaseStatistics stats)
Gets Database statistics.

Parameters:
stats - [out] The DatabaseStatistics instance.