|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaspoev.manager.DatabaseManager
This class acts as an intermedary between a database system and the Vejal interpreter (aspoev.interpreter.Interpreter). This class stores not only persistent application objects, but also intermediary classes that describe schema evolution, instance adaptation, etc. The actual purpose of this class, however, is to provide a clear point of access (hot spots) for Schema Evolution and Instance adaptation aspects that will comprise the 'AspOEv' framework.
| Field Summary | |
protected pJ.jasmine.Transaction |
currentTransaction
|
protected pJ.jasmine.Database |
database
|
protected java.lang.String |
description
|
static int |
READ_ONLY
|
static int |
READ_WRITE
|
protected int |
TRANS_NUM
|
protected java.lang.Thread |
transactionThread
|
protected pJ.jasmine.Hashtab |
typeMap
|
| Constructor Summary | |
DatabaseManager()
Connect to local Database. |
|
DatabaseManager(java.lang.String remoteMethodInvocation)
|
|
| Method Summary | |
void |
abortTransaction()
Aborts the transaciton in progress. |
void |
addType(ClassDeclarationElement newClass)
Add the given class version to the database. |
java.lang.String |
bind(java.lang.String name,
java.lang.Object object)
Creates an association in the database between the specified string and object, much like a Hash table entry. |
void |
close()
Commits state objects and closes database. |
void |
commitTransaction()
Closes the transaciton in progress. |
void |
deletePersistent(java.lang.Object discard)
Removes the argument object from the persistent store. |
MetaObject |
getByObjectID(java.lang.Object OID)
Retrieve an object by its unique identifier. |
ClassDeclarationElement |
getClassDeclaration(TypeReferenceElement type)
Returns the persistent class declaration for the specified type. |
TypeReferenceElement |
getCurrentVersion(TypeReferenceElement type)
Returns the highest version number of the type defined in the database. |
QueryEnumeration |
getDefinedClasses()
|
QueryEnumeration |
getTypeExtent()
Returns all persistent types. |
QueryEnumeration |
getTypeVersionExtent(TypeReferenceElement type)
Retrieves all defined versions of the type stored in the database. |
QueryEnumeration |
getVersionObjectExtent(TypeReferenceElement type)
Retrieves all objects of the specified type in the database. |
java.lang.Object |
lookup(java.lang.String name)
Returns the object associated with the specified name in the database. |
MetaObject |
makePersistent(MetaObject mo)
Makes the argument object persistent. |
void |
open()
Creates a local connection to the database. |
void |
open(java.lang.String name)
Opens a local connection to the database with the specified name. |
pJ.jasmine.Transaction |
startTransaction()
Start a transaction without specifing a name. |
pJ.jasmine.Transaction |
startTransaction(java.lang.String transName)
This method creates a transaction within the database. |
java.lang.String |
toString()
|
java.lang.Object |
unbind(java.lang.String name)
|
QueryEnumeration |
where(TypeReferenceElement type)
|
QueryEnumeration |
where(TypeReferenceElement type,
int count)
|
QueryEnumeration |
where(TypeReferenceElement type,
java.lang.String condition)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int READ_ONLY
public static final int READ_WRITE
protected int TRANS_NUM
protected pJ.jasmine.Transaction currentTransaction
protected java.lang.Thread transactionThread
protected pJ.jasmine.Database database
protected java.lang.String description
protected pJ.jasmine.Hashtab typeMap
| Constructor Detail |
public DatabaseManager()
public DatabaseManager(java.lang.String remoteMethodInvocation)
| Method Detail |
public void abortTransaction()
public void addType(ClassDeclarationElement newClass)
newClass - The type definition to be made persistent
public java.lang.String bind(java.lang.String name,
java.lang.Object object)
name - The name to be associated with the object in the databaseobject - The object to be bound to the provided namepublic void close()
public void commitTransaction()
public void deletePersistent(java.lang.Object discard)
discard - The object to be removed from the persistent storepublic MetaObject getByObjectID(java.lang.Object OID)
public ClassDeclarationElement getClassDeclaration(TypeReferenceElement type)
type - The type to retrieve the declaration of.public TypeReferenceElement getCurrentVersion(TypeReferenceElement type)
type - The type to retrieve the current version of.public QueryEnumeration getDefinedClasses()
public QueryEnumeration getTypeExtent()
public QueryEnumeration getTypeVersionExtent(TypeReferenceElement type)
type - The type to retrieve the version extent of.public QueryEnumeration getVersionObjectExtent(TypeReferenceElement type)
type - The type to retrieve the object extent of.public java.lang.Object lookup(java.lang.String name)
name - The associated name of the object to retrievepublic MetaObject makePersistent(MetaObject mo)
mo - The meta object to make persistent.public void open()
public void open(java.lang.String name)
name - The name of the database to open.public pJ.jasmine.Transaction startTransaction()
public pJ.jasmine.Transaction startTransaction(java.lang.String transName)
transName - The name of the transaction to start
Transactionpublic java.lang.Object unbind(java.lang.String name)
public QueryEnumeration where(TypeReferenceElement type)
public QueryEnumeration where(TypeReferenceElement type,
java.lang.String condition)
public QueryEnumeration where(TypeReferenceElement type,
int count)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||