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 Summary
FieldsFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the UnmodifiableDataObject objectUnmodifiableDataObject
(String name, long id) Constructor for the UnmodifiableDataObject object -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Adds a feature to the ObjectReference attribute of the UnmodifiableDataObject objectfinal void
add an observer to myselffinal void
copyInto
(DataObject dobj) Description of the Methodfinal void
copyInto
(DataStruct dsObj) Description of the Methodfinal void
Description of the Methodfinal void
Description of the Methodfinal void
delete()
Description of the MethodgetData()
Gets the data attribute of the UnmodifiableDataObject objectGets the dataList attribute of the UnmodifiableDataObject objectgetFieldObject
(Field fld) Gets the fieldObject attribute of the UnmodifiableDataObject objectint
Gets the gmtOffset attribute of the UnmodifiableDataObject objectfinal long
getId()
Gets the id attribute of the UnmodifiableDataObject objectfinal DataObjectReference[]
Gets the objectReferences attribute of the UnmodifiableDataObject objectGets the parent attribute of the UnmodifiableDataObject objectfinal int
Gets the refCnt attribute of the UnmodifiableDataObject objectint
Gets the unitSystem attribute of the UnmodifiableDataObject objectfinal void
Description of the Methodfinal boolean
isLoaded()
Gets the loaded attribute of the UnmodifiableDataObject objectboolean
loadData()
this method should be called from the concrete class's loadData method to ensure that the object references get loaded correctly.final boolean
loadId()
Stubbed out loadId method that always returns true.final void
Description of the Methodfinal void
Description of the Methodfinal void
reload()
Description of the Methodfinal void
removeObjectReference
(int pos) Description of the Methodfinal void
Description of the Methodfinal void
remove an observer from my list of observersfinal void
Description of the Methodfinal boolean
save()
tell this object's object references to save themselves s/b called at the end of the concrete class's save().boolean
setDataList
(CommonDataList datalist) Sets the dataList attribute of the UnmodifiableDataObject objectfinal void
setDescription
(String desc) propagate the description change to all object refsfinal boolean
setFieldObject
(Field fld, Object fobj) Sets the fieldObject attribute of the UnmodifiableDataObject objectfinal boolean
setId
(long id) Sets the id attribute of the UnmodifiableDataObject objectfinal void
setModified
(boolean b) Sets the modified attribute of the UnmodifiableDataObject objectfinal void
propagate the name change to all object refsvoid
setParent
(DataObject parent) Sets the parent attribute of the UnmodifiableDataObject objectMethods inherited from class hec.lang.NamedType
addModifiableListener, clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, set, setIgnoreModifiedEvents, setIndex, setValid, toString, update, useRecursiveModifiedTest
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface hec.model.DataObject
getDescription, getName, isModified
-
Field Details
-
_parent
The parent for this object
-
-
Constructor Details
-
UnmodifiableDataObject
public UnmodifiableDataObject()Constructor for the UnmodifiableDataObject object -
UnmodifiableDataObject
Constructor for the UnmodifiableDataObject object- Parameters:
id
- Description of the Parameter
-
-
Method Details
-
setDataList
Sets the dataList attribute of the UnmodifiableDataObject object- Specified by:
setDataList
in interfaceDataObject
- Parameters:
datalist
- The new dataList value- Returns:
- Description of the Return Value
-
setDescription
propagate the description change to all object refs- Specified by:
setDescription
in interfaceDataObject
- Overrides:
setDescription
in classNamedType
- Parameters:
desc
- The new description value
-
setFieldObject
Sets the fieldObject attribute of the UnmodifiableDataObject object- Specified by:
setFieldObject
in interfaceFieldAccessor
- Overrides:
setFieldObject
in classNamedType
- Parameters:
fld
- The new fieldObject valuefobj
- 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 interfaceDataObject
- 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 interfaceDataObject
- Specified by:
setModified
in interfaceModifiable
- Overrides:
setModified
in classNamedType
- Parameters:
b
- The new modified value
-
setName
propagate the name change to all object refs- Specified by:
setName
in interfaceDataObject
- Overrides:
setName
in classNamedType
- Parameters:
name
- The new name value
-
setParent
Sets the parent attribute of the UnmodifiableDataObject object- Specified by:
setParent
in interfaceDataObject
- Parameters:
parent
- The new parent value
-
getData
Gets the data attribute of the UnmodifiableDataObject object- Specified by:
getData
in interfaceDataObject
- Returns:
- The data value
-
getDataList
Gets the dataList attribute of the UnmodifiableDataObject object- Specified by:
getDataList
in interfaceDataObject
- Returns:
- The dataList value
-
getFieldObject
Gets the fieldObject attribute of the UnmodifiableDataObject object- Specified by:
getFieldObject
in interfaceFieldAccessor
- Overrides:
getFieldObject
in classNamedType
- 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 interfaceDataStruct
- Returns:
- The id value
-
isLoaded
public final boolean isLoaded()Gets the loaded attribute of the UnmodifiableDataObject object- Specified by:
isLoaded
in interfaceDataObject
- Returns:
- The loaded value
-
getObjectReferences
Gets the objectReferences attribute of the UnmodifiableDataObject object- Specified by:
getObjectReferences
in interfaceDataObject
- Returns:
- The objectReferences value
-
getParent
Gets the parent attribute of the UnmodifiableDataObject object- Specified by:
getParent
in interfaceDataObject
- Returns:
- The parent value
-
getRefCnt
public final int getRefCnt()Gets the refCnt attribute of the UnmodifiableDataObject object- Specified by:
getRefCnt
in interfaceDataObject
- 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 interfaceDataObject
-
DataChanged
Description of the Method- Specified by:
DataChanged
in interfaceDataChangeListener
- Parameters:
e
- Description of the Parameter
-
locked
Description of the Method- Specified by:
locked
in interfaceLockListener
- Parameters:
le
- Description of the Parameter
-
locked
Description of the Method- Specified by:
locked
in interfaceDataObject
- Parameters:
lock
- Description of the Parameteruser
- Description of the Parameter
-
rename
Description of the Method -
loadId
public final boolean loadId()Stubbed out loadId method that always returns true. Required by the DataObject interface.- Specified by:
loadId
in interfaceDataObject
- 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 interfaceDataObject
- Returns:
- Description of the Return Value
-
addObjectReference
Adds a feature to the ObjectReference attribute of the UnmodifiableDataObject object- Specified by:
addObjectReference
in interfaceDataObject
- 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 interfaceDataObject
- Parameters:
pos
- Description of the Parameter
-
removeObjectReference
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 interfaceDataObject
- Returns:
- Description of the Return Value
-
addObserver
add an observer to myself- Specified by:
addObserver
in interfaceDataObject
- Parameters:
doo
- The feature to be added to the Observer attribute
-
removeObserver
remove an observer from my list of observers- Specified by:
removeObserver
in interfaceDataObject
- Parameters:
doo
- Description of the Parameter
-
incrementRefCnt
public final void incrementRefCnt()Description of the Method- Specified by:
incrementRefCnt
in interfaceDataObject
-
decrementRefCnt
public final void decrementRefCnt()Description of the Method- Specified by:
decrementRefCnt
in interfaceDataObject
-
copyInto
Description of the Method- Specified by:
copyInto
in interfaceDataObject
- Parameters:
dobj
- Description of the Parameter
-
copyInto
Description of the Method- Specified by:
copyInto
in interfaceDataObject
- Parameters:
dsObj
- Description of the Parameter
-
delete
public final void delete()Description of the Method- Specified by:
delete
in interfaceDataObject
-