|
||||||||||
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.file.FileObjectStore
Constructor Summary | |
FileObjectStore(DataManager manager)
|
Method Summary | |
void |
abortTransaction()
|
void |
addElement(NakedCollection collection,
NakedObject element)
|
boolean |
containsElement(NakedCollection collection,
NakedObject element)
|
void |
destroyObject(NakedObject object)
Removes the specified object from the object store. |
void |
endTransaction()
|
java.util.Vector |
getNextElements(NakedCollection collection,
NakedObject fromObject,
int size)
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 fromObject,
int size)
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 size)
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 toObject,
int size)
Gets the previous page of instances. |
boolean |
hasInstances(NakedClass type)
Checks whether there are any instances of the specified type. |
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 sequence)
Generates a unique serial number for the specified squence set. |
void |
startTransaction()
|
Methods inherited from class org.nakedobjects.object.AbstractNakedObjectStore |
areObjectsDistributed, areObjectsProxied, broadcastAddUpdate, broadcastObjectUpdate, broadcastRemoveUpdate, classes, createInstance, getCachedObject, getDebugData, getDebugTitle, getLog, init, isLoaded, loaded, log, log, persistenceType, restart, setLog, setUpdateNotifier, shutdown, unloaded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileObjectStore(DataManager manager)
Method Detail |
public boolean isFirstElement(NakedCollection collection, NakedObject element) throws ObjectStoreException
ObjectStoreException
public boolean isFirstInstance(NakedObject pattern, NakedObject instance) throws ObjectStoreException
NakedObjectStore
true
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
NakedObjectStore
true
if it is, or
false
if it isn't.
ObjectStoreException
public java.util.Vector getNextElements(NakedCollection collection, NakedObject fromObject, int size) throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public java.util.Vector getNextInstances(NakedObject pattern, NakedObject fromObject, int size) throws ObjectStoreException
NakedObjectStore
null
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 size) throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public java.util.Vector getPreviousInstances(NakedObject pattern, NakedObject toObject, int size) throws ObjectStoreException
NakedObjectStore
null
then the vector should contain the last
ObjectStoreException
public void abortTransaction()
public void addElement(NakedCollection collection, NakedObject element) throws ObjectStoreException
ObjectStoreException
public boolean containsElement(NakedCollection collection, NakedObject element) throws ObjectStoreException
ObjectStoreException
public void destroyObject(NakedObject object) throws ObjectStoreException
NakedObjectStore
ObjectStoreException
public void endTransaction()
public boolean hasInstances(NakedClass type) throws ObjectStoreException
NakedObjectStore
true
if there are, or false
if there are not.
ObjectStoreException
public void makePersistent(NakedObject object) throws ObjectStoreException
NakedObjectStore
setOid
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.
ObjectStoreException
public 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
ObjectStoreException
public long serialNumber(java.lang.String sequence)
NakedObjectStore
public void startTransaction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |