|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.object.AbstractNakedObjectStore
org.nakedobjects.persistence.sql.SqlObjectStore
| Constructor Summary | |
SqlObjectStore()
|
|
| Method Summary | |
void |
abortTransaction()
|
void |
addCollectionMapper(java.lang.String childClass,
java.lang.String fieldName,
SqlCollectionMapper mapper)
|
void |
addElement(NakedCollection collection,
NakedObject element)
|
void |
addMapper(SqlObjectMapper mapper)
|
java.util.Enumeration |
classes()
Returns a list of all the classes (as NakedClasses) that this object store can handle. |
boolean |
containsElement(NakedCollection collection,
NakedObject element)
|
void |
destroyObject(NakedObject object)
Removes the specified object from the object store. |
void |
endTransaction()
|
DatabaseConnection |
getConnection()
return the database connection strategy, which is used to get a java.sql.Connection. |
java.util.Vector |
getNextElements(NakedCollection collection,
NakedObject fromObject,
int count)
Retrieve the next set (the number specified by count) of objects for the specified collection starting from, but not including, the specified object. |
java.util.Vector |
getNextInstances(NakedObject pattern,
NakedObject fromInstance,
int count)
Gets the next page of instances. |
NakedObject |
getObject(java.lang.Object oid)
Retrieves the object identified by the specified OID from the object store. |
java.util.Vector |
getPreviousElements(NakedCollection collection,
NakedObject toObject,
int count)
Retrieve the previous set (the number specified by count) of objects for the specified collection starting from the specified object. |
java.util.Vector |
getPreviousInstances(NakedObject pattern,
NakedObject toInstance,
int count)
Gets the previous page of instances. |
protected NakedObject |
getUnresolvedObject(org.nakedobjects.persistence.sql.SqlOid oid)
|
boolean |
hasInstances(NakedClass type)
Checks whether there are any instances of the specified type. |
void |
init()
|
boolean |
isFirstElement(NakedCollection collection,
NakedObject element)
|
boolean |
isFirstInstance(NakedObject pattern,
NakedObject instance)
Checks whether the specified instance is the first one instance in the set of all instances. |
boolean |
isLastElement(NakedCollection collection,
NakedObject element)
|
boolean |
isLastInstance(NakedObject pattern,
NakedObject instance)
Checks whether the specified instance is the last instance in the set of all instances. |
void |
makePersistent(NakedObject object)
Makes a naked object persistent. |
java.lang.String |
name()
|
int |
numberOfElements(NakedCollection collection)
|
int |
numberOfInstances(NakedObject pattern)
|
void |
removeElement(NakedCollection collection,
NakedObject element)
|
void |
resolve(NakedObject object)
Re-initialises the fields of an object. |
void |
save(NakedObject object)
Persists the specified object's state. |
long |
serialNumber(java.lang.String id)
Generates a unique serial number for the specified squence set. |
void |
shutdown()
|
void |
startTransaction()
|
| Methods inherited from class org.nakedobjects.object.AbstractNakedObjectStore |
areObjectsDistributed, areObjectsProxied, broadcastAddUpdate, broadcastObjectUpdate, broadcastRemoveUpdate, createInstance, getCachedObject, getDebugData, getDebugTitle, getLog, isLoaded, loaded, log, log, persistenceType, restart, setLog, setUpdateNotifier, unloaded |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SqlObjectStore()
throws ObjectStoreException
| Method Detail |
public DatabaseConnection getConnection()
public boolean isFirstElement(NakedCollection collection,
NakedObject element)
throws ObjectStoreException
ObjectStoreException
public boolean isFirstInstance(NakedObject pattern,
NakedObject instance)
throws ObjectStoreException
NakedObjectStoretrue if it is, or
false if it isn't.
ObjectStoreException
public boolean isLastElement(NakedCollection collection,
NakedObject element)
throws ObjectStoreException
ObjectStoreException
public boolean isLastInstance(NakedObject pattern,
NakedObject instance)
throws ObjectStoreException
NakedObjectStoretrue if it is, or
false if it isn't.
ObjectStoreException
public java.util.Vector getNextElements(NakedCollection collection,
NakedObject fromObject,
int count)
throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public java.util.Vector getNextInstances(NakedObject pattern,
NakedObject fromInstance,
int count)
throws ObjectStoreException
NakedObjectStorenull references are to be
ignored;null in which case this
last condition does not apply.
ObjectStoreException
public NakedObject getObject(java.lang.Object oid)
throws ObjectNotFoundException,
ObjectStoreException
NakedObjectStore
oid - of the object to be retrieved
ObjectNotFoundException - when no object corresponding to the oid can be found
ObjectStoreException
public java.util.Vector getPreviousElements(NakedCollection collection,
NakedObject toObject,
int count)
throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public java.util.Vector getPreviousInstances(NakedObject pattern,
NakedObject toInstance,
int count)
throws ObjectStoreException
NakedObjectStorenull then the vector should contain the last
ObjectStoreExceptionpublic void abortTransaction()
public void addElement(NakedCollection collection,
NakedObject element)
throws ObjectStoreException
ObjectStoreException
public void addMapper(SqlObjectMapper mapper)
throws ObjectStoreException
ObjectStoreException
public void addCollectionMapper(java.lang.String childClass,
java.lang.String fieldName,
SqlCollectionMapper mapper)
throws ObjectStoreException
ObjectStoreException
public java.util.Enumeration classes()
throws ObjectStoreException
NakedObjectStore
classes in interface NakedObjectStoreclasses in class AbstractNakedObjectStoreObjectStoreException
public boolean containsElement(NakedCollection collection,
NakedObject element)
throws ObjectStoreException
ObjectStoreException
public void destroyObject(NakedObject object)
throws ObjectStoreException
NakedObjectStore
ObjectStoreExceptionpublic void endTransaction()
public boolean hasInstances(NakedClass type)
throws ObjectStoreException
NakedObjectStoretrue
if there are, or false if there are not.
ObjectStoreException
public void init()
throws ObjectStoreException
init in interface NakedObjectStoreinit in class AbstractNakedObjectStoreObjectStoreException
public void makePersistent(NakedObject object)
throws ObjectStoreException
NakedObjectStoresetOid method). The object, should also be added to the cache as the
object is implicitly 'in use'.
If the object has any associations then each of these, where they aren't already persistent, should also be made persistent by recursively calling this method.
If the object to be persisted is a collection, then each element of that collection, that is not already persistent, should be made persistent by recursively calling this method.
ObjectStoreExceptionpublic java.lang.String name()
public int numberOfElements(NakedCollection collection)
throws ObjectStoreException
ObjectStoreException
public int numberOfInstances(NakedObject pattern)
throws ObjectStoreException
ObjectStoreException
public void removeElement(NakedCollection collection,
NakedObject element)
throws ObjectStoreException
ObjectStoreException
public void resolve(NakedObject object)
throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public void save(NakedObject object)
throws ObjectStoreException
NakedObjectStore
ObjectStoreExceptionpublic long serialNumber(java.lang.String id)
NakedObjectStore
public void shutdown()
shutdown in interface NakedObjectStoreshutdown in class AbstractNakedObjectStorepublic void startTransaction()
protected NakedObject getUnresolvedObject(org.nakedobjects.persistence.sql.SqlOid oid)
throws ObjectNotFoundException,
ObjectStoreException
ObjectNotFoundException
ObjectStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||