|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.runtime.persistence.oidgenerator.OidGeneratorAbstract
org.nakedobjects.runtime.persistence.oidgenerator.simple.SimpleOidGenerator
public class SimpleOidGenerator
Generates OIDs based on monotonically.
Specifies the OidStringifierDirect as the OID stringifier
(SerialOid is conformant)).
| Nested Class Summary | |
|---|---|
static class |
SimpleOidGenerator.Memento
|
| Constructor Summary | |
|---|---|
SimpleOidGenerator()
|
|
SimpleOidGenerator(long seed)
Persistent Oids count up from the provided seed parameter, while
Oid.isTransient() transient Oids count down. |
|
SimpleOidGenerator(SimpleOidGenerator.Memento memento)
|
|
| Method Summary | |
|---|---|
void |
convertTransientToPersistentOid(Oid oid)
Convert the Oid from transient to
persistent, storing the previous Oid as Oid.getPrevious() |
SerialOid |
createTransientOid(java.lang.Object object)
Create a new transient Oid for the
supplied pojo, uniquely distinguishable from any other Oid. |
void |
debugData(DebugString debug)
|
java.lang.String |
debugTitle()
|
SimpleOidGenerator.Memento |
getMemento()
|
java.lang.String |
name()
|
void |
resetTo(SimpleOidGenerator.Memento memento)
Reset to a SimpleOidGenerator.Memento previously obtained via getMemento(). |
| Methods inherited from class org.nakedobjects.runtime.persistence.oidgenerator.OidGeneratorAbstract |
|---|
close, getOidStringifier, injectInto, open |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleOidGenerator()
public SimpleOidGenerator(long seed)
Oids count up from the provided seed parameter, while
Oid.isTransient() transient Oids count down.
public SimpleOidGenerator(SimpleOidGenerator.Memento memento)
| Method Detail |
|---|
public java.lang.String name()
public SerialOid createTransientOid(java.lang.Object object)
OidGeneratortransient Oid for the
supplied pojo, uniquely distinguishable from any other Oid.
public void convertTransientToPersistentOid(Oid oid)
OidGeneratorOid from transient to
persistent, storing the previous Oid as Oid.getPrevious()
Implementation notes:
AdapterManager will need to be updated so that the
adapter is re-mapped by the new Oid. However,
the not the responsibility of the OidGenerator to do this;
it merely ensures that the Oid is in the correct new state.
Oid
prior to call. Check for details.
public SimpleOidGenerator.Memento getMemento()
public void resetTo(SimpleOidGenerator.Memento memento)
SimpleOidGenerator.Memento previously obtained via getMemento().
Used in particular by the InMemoryObjectStore to reset (a new OidGenerator
is created each time).
public void debugData(DebugString debug)
public java.lang.String debugTitle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||