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 booleanAdds a feature to the ObjectReference attribute of the UnmodifiableDataObject objectfinal voidadd an observer to myselffinal voidcopyInto(DataObject dobj) Description of the Methodfinal voidcopyInto(DataStruct dsObj) Description of the Methodfinal voidDescription of the Methodfinal voidDescription of the Methodfinal voiddelete()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 objectintGets the gmtOffset attribute of the UnmodifiableDataObject objectfinal longgetId()Gets the id attribute of the UnmodifiableDataObject objectfinal DataObjectReference[]Gets the objectReferences attribute of the UnmodifiableDataObject objectGets the parent attribute of the UnmodifiableDataObject objectfinal intGets the refCnt attribute of the UnmodifiableDataObject objectintGets the unitSystem attribute of the UnmodifiableDataObject objectfinal voidDescription of the Methodfinal booleanisLoaded()Gets the loaded attribute of the UnmodifiableDataObject objectbooleanloadData()this method should be called from the concrete class's loadData method to ensure that the object references get loaded correctly.final booleanloadId()Stubbed out loadId method that always returns true.final voidDescription of the Methodfinal voidDescription of the Methodfinal voidreload()Description of the Methodfinal voidremoveObjectReference(int pos) Description of the Methodfinal voidDescription of the Methodfinal voidremove an observer from my list of observersfinal voidDescription of the Methodfinal booleansave()tell this object's object references to save themselves s/b called at the end of the concrete class's save().booleansetDataList(CommonDataList datalist) Sets the dataList attribute of the UnmodifiableDataObject objectfinal voidsetDescription(String desc) propagate the description change to all object refsfinal booleansetFieldObject(Field fld, Object fobj) Sets the fieldObject attribute of the UnmodifiableDataObject objectfinal booleansetId(long id) Sets the id attribute of the UnmodifiableDataObject objectfinal voidsetModified(boolean b) Sets the modified attribute of the UnmodifiableDataObject objectfinal voidpropagate the name change to all object refsvoidsetParent(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, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
setDataListin interfaceDataObject- Parameters:
datalist- The new dataList value- Returns:
- Description of the Return Value
-
setDescription
propagate the description change to all object refs- Specified by:
setDescriptionin interfaceDataObject- Overrides:
setDescriptionin classNamedType- Parameters:
desc- The new description value
-
setFieldObject
Sets the fieldObject attribute of the UnmodifiableDataObject object- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin 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:
setIdin 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:
setModifiedin interfaceDataObject- Specified by:
setModifiedin interfaceModifiable- Overrides:
setModifiedin classNamedType- Parameters:
b- The new modified value
-
setName
propagate the name change to all object refs- Specified by:
setNamein interfaceDataObject- Overrides:
setNamein classNamedType- Parameters:
name- The new name value
-
setParent
Sets the parent attribute of the UnmodifiableDataObject object- Specified by:
setParentin interfaceDataObject- Parameters:
parent- The new parent value
-
getData
Gets the data attribute of the UnmodifiableDataObject object- Specified by:
getDatain interfaceDataObject- Returns:
- The data value
-
getDataList
Gets the dataList attribute of the UnmodifiableDataObject object- Specified by:
getDataListin interfaceDataObject- Returns:
- The dataList value
-
getFieldObject
Gets the fieldObject attribute of the UnmodifiableDataObject object- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin 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:
getIdin interfaceDataStruct- Returns:
- The id value
-
isLoaded
public final boolean isLoaded()Gets the loaded attribute of the UnmodifiableDataObject object- Specified by:
isLoadedin interfaceDataObject- Returns:
- The loaded value
-
getObjectReferences
Gets the objectReferences attribute of the UnmodifiableDataObject object- Specified by:
getObjectReferencesin interfaceDataObject- Returns:
- The objectReferences value
-
getParent
Gets the parent attribute of the UnmodifiableDataObject object- Specified by:
getParentin interfaceDataObject- Returns:
- The parent value
-
getRefCnt
public final int getRefCnt()Gets the refCnt attribute of the UnmodifiableDataObject object- Specified by:
getRefCntin 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:
reloadin interfaceDataObject
-
DataChanged
Description of the Method- Specified by:
DataChangedin interfaceDataChangeListener- Parameters:
e- Description of the Parameter
-
locked
Description of the Method- Specified by:
lockedin interfaceLockListener- Parameters:
le- Description of the Parameter
-
locked
Description of the Method- Specified by:
lockedin 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:
loadIdin 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:
loadDatain interfaceDataObject- Returns:
- Description of the Return Value
-
addObjectReference
Adds a feature to the ObjectReference attribute of the UnmodifiableDataObject object- Specified by:
addObjectReferencein 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:
removeObjectReferencein 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:
savein interfaceDataObject- Returns:
- Description of the Return Value
-
addObserver
add an observer to myself- Specified by:
addObserverin interfaceDataObject- Parameters:
doo- The feature to be added to the Observer attribute
-
removeObserver
remove an observer from my list of observers- Specified by:
removeObserverin interfaceDataObject- Parameters:
doo- Description of the Parameter
-
incrementRefCnt
public final void incrementRefCnt()Description of the Method- Specified by:
incrementRefCntin interfaceDataObject
-
decrementRefCnt
public final void decrementRefCnt()Description of the Method- Specified by:
decrementRefCntin interfaceDataObject
-
copyInto
Description of the Method- Specified by:
copyIntoin interfaceDataObject- Parameters:
dobj- Description of the Parameter
-
copyInto
Description of the Method- Specified by:
copyIntoin interfaceDataObject- Parameters:
dsObj- Description of the Parameter
-
delete
public final void delete()Description of the Method- Specified by:
deletein interfaceDataObject
-