Package hec.model

Class UnmodifiableDataObject

java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.model.UnmodifiableDataObject
All Implemented Interfaces:
AbstractDataListener, DataChangeListener, LockListener, AsciiSerializable, FieldAccessor, DataObject, DataStruct, Serializable, Cloneable, Comparable, EventListener, Observer, Modifiable

public abstract class UnmodifiableDataObject extends NamedType implements DataObject, AsciiSerializable
Description of the Class
See Also:
  • Field Details

    • _parent

      protected transient DataObject _parent
      The parent for this object
  • Constructor Details

    • UnmodifiableDataObject

      public UnmodifiableDataObject()
      Constructor for the UnmodifiableDataObject object
    • UnmodifiableDataObject

      public UnmodifiableDataObject(String name, long id)
      Constructor for the UnmodifiableDataObject object
      Parameters:
      id - Description of the Parameter
  • Method Details

    • setDataList

      public boolean setDataList(CommonDataList datalist)
      Sets the dataList attribute of the UnmodifiableDataObject object
      Specified by:
      setDataList in interface DataObject
      Parameters:
      datalist - The new dataList value
      Returns:
      Description of the Return Value
    • setDescription

      public final void setDescription(String desc)
      propagate the description change to all object refs
      Specified by:
      setDescription in interface DataObject
      Overrides:
      setDescription in class NamedType
      Parameters:
      desc - The new description value
    • setFieldObject

      public final boolean setFieldObject(Field fld, Object fobj)
      Sets the fieldObject attribute of the UnmodifiableDataObject object
      Specified by:
      setFieldObject in interface FieldAccessor
      Overrides:
      setFieldObject in class NamedType
      Parameters:
      fld - The new fieldObject value
      fobj - The new fieldObject value
      Returns:
      Description of the Return Value
    • setId

      public final boolean setId(long id)
      Sets the id attribute of the UnmodifiableDataObject object
      Specified by:
      setId in interface DataObject
      Parameters:
      id - The new id value
      Returns:
      Description of the Return Value
    • setModified

      public final void setModified(boolean b)
      Sets the modified attribute of the UnmodifiableDataObject object
      Specified by:
      setModified in interface DataObject
      Specified by:
      setModified in interface Modifiable
      Overrides:
      setModified in class NamedType
      Parameters:
      b - The new modified value
    • setName

      public final void setName(String name)
      propagate the name change to all object refs
      Specified by:
      setName in interface DataObject
      Overrides:
      setName in class NamedType
      Parameters:
      name - The new name value
    • setParent

      public void setParent(DataObject parent)
      Sets the parent attribute of the UnmodifiableDataObject object
      Specified by:
      setParent in interface DataObject
      Parameters:
      parent - The new parent value
    • getData

      public DataStruct getData()
      Gets the data attribute of the UnmodifiableDataObject object
      Specified by:
      getData in interface DataObject
      Returns:
      The data value
    • getDataList

      public CommonDataList getDataList()
      Gets the dataList attribute of the UnmodifiableDataObject object
      Specified by:
      getDataList in interface DataObject
      Returns:
      The dataList value
    • getFieldObject

      public Object getFieldObject(Field fld)
      Gets the fieldObject attribute of the UnmodifiableDataObject object
      Specified by:
      getFieldObject in interface FieldAccessor
      Overrides:
      getFieldObject in class NamedType
      Parameters:
      fld - Description of the Parameter
      Returns:
      The fieldObject value
    • getGmtOffset

      public int getGmtOffset()
      Gets the gmtOffset attribute of the UnmodifiableDataObject object
      Returns:
      The gmtOffset value
    • getId

      public final long getId()
      Gets the id attribute of the UnmodifiableDataObject object
      Specified by:
      getId in interface DataStruct
      Returns:
      The id value
    • isLoaded

      public final boolean isLoaded()
      Gets the loaded attribute of the UnmodifiableDataObject object
      Specified by:
      isLoaded in interface DataObject
      Returns:
      The loaded value
    • getObjectReferences

      public final DataObjectReference[] getObjectReferences()
      Gets the objectReferences attribute of the UnmodifiableDataObject object
      Specified by:
      getObjectReferences in interface DataObject
      Returns:
      The objectReferences value
    • getParent

      public DataObject getParent()
      Gets the parent attribute of the UnmodifiableDataObject object
      Specified by:
      getParent in interface DataObject
      Returns:
      The parent value
    • getRefCnt

      public final int getRefCnt()
      Gets the refCnt attribute of the UnmodifiableDataObject object
      Specified by:
      getRefCnt in interface DataObject
      Returns:
      The refCnt value
    • getUnitSystem

      public int getUnitSystem()
      Gets the unitSystem attribute of the UnmodifiableDataObject object
      Returns:
      The unitSystem value
    • reload

      public final void reload()
      Description of the Method
      Specified by:
      reload in interface DataObject
    • DataChanged

      public final void DataChanged(DataChangeEvent e)
      Description of the Method
      Specified by:
      DataChanged in interface DataChangeListener
      Parameters:
      e - Description of the Parameter
    • locked

      public final void locked(LockEvent le)
      Description of the Method
      Specified by:
      locked in interface LockListener
      Parameters:
      le - Description of the Parameter
    • locked

      public final void locked(boolean lock, String user)
      Description of the Method
      Specified by:
      locked in interface DataObject
      Parameters:
      lock - Description of the Parameter
      user - Description of the Parameter
    • rename

      public final void rename(String s)
      Description of the Method
      Overrides:
      rename in class NamedType
      Parameters:
      s - Description of the Parameter
    • loadId

      public final boolean loadId()
      Stubbed out loadId method that always returns true. Required by the DataObject interface.
      Specified by:
      loadId in interface DataObject
      Returns:
      Description of the Return Value
      See Also:
    • loadData

      public boolean loadData()
      this method should be called from the concrete class's loadData method to ensure that the object references get loaded correctly.
      Specified by:
      loadData in interface DataObject
      Returns:
      Description of the Return Value
    • addObjectReference

      public final boolean addObjectReference(DataObjectReference ref)
      Adds a feature to the ObjectReference attribute of the UnmodifiableDataObject object
      Specified by:
      addObjectReference in interface DataObject
      Parameters:
      ref - The feature to be added to the ObjectReference attribute
      Returns:
      Description of the Return Value
    • removeObjectReference

      public final void removeObjectReference(int pos)
      Description of the Method
      Specified by:
      removeObjectReference in interface DataObject
      Parameters:
      pos - Description of the Parameter
    • removeObjectReference

      public final void removeObjectReference(DataObjectReference ref)
      Description of the Method
      Parameters:
      ref - Description of the Parameter
    • save

      public final boolean save()
      tell this object's object references to save themselves s/b called at the end of the concrete class's save().
      Specified by:
      save in interface DataObject
      Returns:
      Description of the Return Value
    • addObserver

      public final void addObserver(AbstractDataListener doo)
      add an observer to myself
      Specified by:
      addObserver in interface DataObject
      Parameters:
      doo - The feature to be added to the Observer attribute
    • removeObserver

      public final void removeObserver(AbstractDataListener doo)
      remove an observer from my list of observers
      Specified by:
      removeObserver in interface DataObject
      Parameters:
      doo - Description of the Parameter
    • incrementRefCnt

      public final void incrementRefCnt()
      Description of the Method
      Specified by:
      incrementRefCnt in interface DataObject
    • decrementRefCnt

      public final void decrementRefCnt()
      Description of the Method
      Specified by:
      decrementRefCnt in interface DataObject
    • copyInto

      public final void copyInto(DataObject dobj)
      Description of the Method
      Specified by:
      copyInto in interface DataObject
      Parameters:
      dobj - Description of the Parameter
    • copyInto

      public final void copyInto(DataStruct dsObj)
      Description of the Method
      Specified by:
      copyInto in interface DataObject
      Parameters:
      dsObj - Description of the Parameter
    • delete

      public final void delete()
      Description of the Method
      Specified by:
      delete in interface DataObject