|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.core.model.RSEPersistableObject
public abstract class RSEPersistableObject
An object that keeps track of its persistable state: whether it is dirty or not and whether or not any of its progeny are marked dirty.
Field Summary |
---|
Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
NO_CHILDREN |
Constructor Summary | |
---|---|
RSEPersistableObject()
|
Method Summary | |
---|---|
protected boolean |
compareStrings(String s1,
String s2)
Does a null-aware string comparison. |
boolean |
isDirty()
An object is dirty if a change has been made to it that requires it to be persisted. |
boolean |
isTainted()
An object is tainted if it contains an object that is dirty somewhere in its containment hierarchy. |
void |
setDirty(boolean flag)
An object is dirty if a change has been made to it that requires it to be persisted. |
void |
setTainted(boolean flag)
Sets the tainted attribute for this object. |
void |
setWasRestored(boolean flag)
Sets the restored state of the object. |
boolean |
wasRestored()
An object was restored if it originated from a persistent form. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
---|
commit, getPersistableChildren, getPersistableParent |
Constructor Detail |
---|
public RSEPersistableObject()
Method Detail |
---|
public final boolean isDirty()
IRSEPersistableContainer
isDirty
in interface IRSEPersistableContainer
public final void setDirty(boolean flag)
IRSEPersistableContainer
An object is dirty if a change has been made to it that requires it to be persisted. Objects should usually mark themselves dirty when a persistable change is made. However, there may be a need to mark related objects dirty as well.
Persistable changes are:
A rename may also cause a parent to be marked dirty if the parent refers to the child by name.
Setting this value to false should be done only in the persistence manager after the object has been written to the DOM.
Marking an object as dirty must cause it and all of its ancestors in the persistence hierarchy to be marked as tainted.
setDirty
in interface IRSEPersistableContainer
flag
- true if the object must be persisted.public final boolean wasRestored()
IRSEPersistableContainer
wasRestored
in interface IRSEPersistableContainer
public final void setWasRestored(boolean flag)
IRSEPersistableContainer
setWasRestored
in interface IRSEPersistableContainer
flag
- true if the object was restored.public final boolean isTainted()
IRSEPersistableContainer
isTainted
in interface IRSEPersistableContainer
public final void setTainted(boolean flag)
IRSEPersistableContainer
setTainted
in interface IRSEPersistableContainer
flag
- the tainted state of the object.protected boolean compareStrings(String s1, String s2)
null
will compare equal. Otherwise the result is
the same as s1.equals(s2), if s1 is not null.
s1
- The first string to compares2
- the second string
|
RSE Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |