RSE
Release 1.0

org.eclipse.rse.core.model
Class RSEModelObject

java.lang.Object
  extended byorg.eclipse.rse.core.model.PropertySetContainer
      extended byorg.eclipse.rse.core.model.RSEModelObject
All Implemented Interfaces:
IPropertySetContainer, IRSEModelObject, org.eclipse.rse.core.persistance.IRSEPersistableContainer
Direct Known Subclasses:
AbstractConnectorService, org.eclipse.rse.core.internal.subsystems.ServerLauncher, SubSystem, org.eclipse.rse.internal.references.SystemReferencedObject, org.eclipse.rse.internal.references.SystemReferencingObject

public abstract class RSEModelObject
extends PropertySetContainer
implements IRSEModelObject

Provides common support for local RSE model objects Extenders inherit property set support


Field Summary
protected  boolean _isDirty
           
protected  boolean _wasRestored
           
 
Constructor Summary
RSEModelObject()
           
 
Method Summary
protected  boolean compareStrings(String s1, String s2)
          Does a null-aware string comparison.
 String getDescription()
           
 boolean isDirty()
          An object is dirty if a change has been made to it that requires it to be persisted.
 void setDirty(boolean flag)
          An object is dirty if a change has been made to it that requires it to be persisted.
 void setWasRestored(boolean flag)
          The the "restored" state of the object.
 boolean wasRestored()
          An object was restored if it originated from a persistent form.
 
Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
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.IRSEModelObject
getName
 
Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
Methods inherited from interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
commit
 

Field Detail

_isDirty

protected boolean _isDirty

_wasRestored

protected boolean _wasRestored
Constructor Detail

RSEModelObject

public RSEModelObject()
Method Detail

isDirty

public final boolean isDirty()
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
An object is dirty if a change has been made to it that requires it to be persisted.

Specified by:
isDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Returns:
true if the object is dirty

setDirty

public void setDirty(boolean flag)
Description copied from interface: org.eclipse.rse.core.persistance.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. Setting this value to false should be done only in the persistence manager after the object has been written to the DOM.

Specified by:
setDirty in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Parameters:
flag - true if the object must be persisted.

wasRestored

public final boolean wasRestored()
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
An object was restored if it originated from a persistent form.

Specified by:
wasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Returns:
true if the object was created from its persistent form, false if the object has never been persisted.

setWasRestored

public final void setWasRestored(boolean flag)
Description copied from interface: org.eclipse.rse.core.persistance.IRSEPersistableContainer
The the "restored" state of the object. Only persistence managers should do this.

Specified by:
setWasRestored in interface org.eclipse.rse.core.persistance.IRSEPersistableContainer
Parameters:
flag - true if the object was restored.

getDescription

public String getDescription()
Specified by:
getDescription in interface IRSEModelObject

compareStrings

protected boolean compareStrings(String s1,
                                 String s2)
Does a null-aware string comparison. Two strings that are null will compare equal. Otherwise the result is the same as s1.equals(s2), if s1 is not null.

Parameters:
s1 - The first string to compare
s2 - the second string
Returns:
true if the strings are equal or both null.

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.