Package hec.rss.model
Class WaterAccountSet
java.lang.Object
hec.rss.model.WaterAccountSet
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable
The Class WaterAccountSet.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new water account set.WaterAccountSet(String name, String desc, List<StorageZoneRef> zones, int index) Instantiates a new water account set. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the water account.clone()booleanbooleancontainsReservoirOpSet(int resID, int opSetID) Contains reservoir op set.booleancontainsReservoirOpSet(StorageZoneRef zoneRef) Contains reservoir op set.createNewWaterAccount(String name, String description, int setIndex) Creates the new water account.voiddeleteWaterAccount(WaterAccount waterAccount) Delete water account.booleanGets the description.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.intgetIndex()Gets the index.getName()Gets the name.Gets the res pool refs.intgetSize()Number of WaterAccounts this set holds.intgetSize(ReservoirElement res) Number of WaterAccounts this set holds using a given reservoir.getWaterAccount(String name) Gets the water account.Gets the water accounts.Gets the water accounts using a particular reservoir.getWaterAccountSet(int index) Gets the water account.voidinitialize(RssSystem system, RunTimeWindow rtw) Initialize water accounts in set.intNext water account index.voidrenameWaterAccount(String oldName, String newName) Rename water account.voidsetAllAcctsUsePctOfCon(boolean val) voidsetDescription(String description) Sets the description.booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidSets the name.voidsetResZoneRefs(List<StorageZoneRef> resPoolRefs) Sets the res pool refs.voidsetWaterAccounts(List<WaterAccount> waterAccounts) Sets the water accounts.toString()
-
Constructor Details
-
WaterAccountSet
public WaterAccountSet()Instantiates a new water account set. -
WaterAccountSet
Instantiates a new water account set.- Parameters:
name- the namedesc- the desczones- the zonesindex- the index
-
-
Method Details
-
containsReservoirOpSet
public boolean containsReservoirOpSet(int resID, int opSetID) Contains reservoir op set.- Parameters:
resID- the res idopSetID- the op set id- Returns:
- true, if successful
-
containsReservoir
-
getIndex
public int getIndex()Gets the index.- Returns:
- the index
-
getSize
public int getSize()Number of WaterAccounts this set holds.- Returns:
- int how many WaterAccounts this set holds
-
getSize
Number of WaterAccounts this set holds using a given reservoir.- Returns:
- int how many WaterAccounts this set holds
-
setName
Sets the name.- Parameters:
name- the new name
-
getName
Gets the name.- Returns:
- the name
-
setDescription
Sets the description.- Parameters:
description- the new description
-
getDescription
Gets the description.- Returns:
- the description
-
setResZoneRefs
Sets the res pool refs.- Parameters:
resPoolRefs- the new res pool refs
-
getResZoneRefs
Gets the res pool refs.- Returns:
- the res pool refs
-
getAllAcctsUsePctOfCon
public boolean getAllAcctsUsePctOfCon() -
setAllAcctsUsePctOfCon
public void setAllAcctsUsePctOfCon(boolean val) -
containsReservoirOpSet
Contains reservoir op set.- Parameters:
zoneRef- the zone ref- Returns:
- true, if successful
-
setWaterAccounts
Sets the water accounts.- Parameters:
waterAccounts- the new water accounts
-
getWaterAccounts
Gets the water accounts.- Returns:
- the water accounts
-
addWaterAccount
Adds the water account.- Parameters:
wa- the wa
-
getWaterAccounts
Gets the water accounts using a particular reservoir.- Parameters:
res-- Returns:
- the water accounts
-
createNewWaterAccount
Creates the new water account.- Parameters:
name- the namedescription- the descriptionsetIndex- the set index- Returns:
- the water account
-
renameWaterAccount
Rename water account.- Parameters:
oldName- the old namenewName- the new name
-
deleteWaterAccount
Delete water account.- Parameters:
waterAccount- the water account
-
getWaterAccount
Gets the water account.- Parameters:
name- the name- Returns:
- the water account
-
getWaterAccountSet
Gets the water account.- Parameters:
index- the index- Returns:
- the water account
-
nextWaterAccountIndex
public int nextWaterAccountIndex()Next water account index.- Returns:
- the int
-
toString
-
clone
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-
initialize
Initialize water accounts in set.
-