Package hec.data.watersupply
Class JDomContractWaterSupplyAccounting
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.data.watersupply.JDomContractWaterSupplyAccounting
- All Implemented Interfaces:
IContractWaterSupplyAccounting,AsciiSerializable,FieldAccessor,Serializable,Cloneable,Comparable,Observer,Modifiable
public class JDomContractWaterSupplyAccounting
extends NamedType
implements IContractWaterSupplyAccounting, Modifiable
Holds the water supply accounting for the pumps associated with a contract.
- See Also:
-
Field Summary
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionJDomContractWaterSupplyAccounting(IWaterUserContractRef contractRef) Use this constructor, we need the contract ref. -
Method Summary
Modifier and TypeMethodDescriptionbuildPumpAccounting(LocationTemplate pumpLocationRef) voidClears all of the modified time windows.Returns all of the pump accounting for this contract.getAllPumpAccounting(Date startDate, Date endDate) Returns all of the pump accounting for this contract windowed to the start and end dates.getPumpAccounting(LocationTemplate pumpLocRef) Returns the accounting for a specified pump location reference.getPumpAccounting(LocationTemplate pumpLocRef, Date startDate, Date endDate) Returns a windowed accounting for a specified pump location reference using the start and end date.Returns the mapping of modified time windows for all of the pumps for this contract.getTimeWindowMap(LocationTemplate pumpLocRef) Returns a modified time window map for the argument pump location reference.The contract reference for this accounting.voidmergeAccounting(LocationTemplate pumpLocRef, NavigableMap<Date, IWaterSupplyPumpAccounting> accountingMap, boolean generateModifiedTimeWindow, boolean preserveModifiedData) Merge the incoming pump data using a store rule.voidmergeAccounting(IContractWaterSupplyAccounting contractAccounting, boolean generateModifiedTimeWindow, boolean preserveModifiedData) Merges all of the data from the arg contract accounting into this contract accounting.voidTry to avoid calling this as it will prune undef values that are used w/in the database to control values that need to be deletedvoidsetWaterUserContractRef(IWaterUserContractRef contractRef) intsize()The total number of accountings for this contract accounting instance.windowAndLimit(Date startTime, Date endTime, boolean headFlag, int rowLimit) Returns a limited window of this accounting.Methods inherited from class hec.lang.NamedType
addModifiableListener, clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getFieldObject, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setFieldObject, setIgnoreModifiedEvents, setIndex, setModified, setName, 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 rma.lang.Modifiable
isModified, setModified
-
Constructor Details
-
JDomContractWaterSupplyAccounting
public JDomContractWaterSupplyAccounting() -
JDomContractWaterSupplyAccounting
Use this constructor, we need the contract ref.- Parameters:
contractRef-
-
-
Method Details
-
getWaterUserContractRef
Description copied from interface:IContractWaterSupplyAccountingThe contract reference for this accounting.- Specified by:
getWaterUserContractRefin interfaceIContractWaterSupplyAccounting- Returns:
-
setWaterUserContractRef
-
getAllPumpAccounting
Description copied from interface:IContractWaterSupplyAccountingReturns all of the pump accounting for this contract.- Specified by:
getAllPumpAccountingin interfaceIContractWaterSupplyAccounting- Returns:
-
size
public int size()Description copied from interface:IContractWaterSupplyAccountingThe total number of accountings for this contract accounting instance.- Specified by:
sizein interfaceIContractWaterSupplyAccounting- Returns:
-
getAllPumpAccounting
public Map<LocationTemplate,NavigableMap<Date, getAllPumpAccountingIWaterSupplyPumpAccounting>> (Date startDate, Date endDate) Description copied from interface:IContractWaterSupplyAccountingReturns all of the pump accounting for this contract windowed to the start and end dates.- Specified by:
getAllPumpAccountingin interfaceIContractWaterSupplyAccounting- Returns:
-
getPumpAccounting
Description copied from interface:IContractWaterSupplyAccountingReturns the accounting for a specified pump location reference.- Specified by:
getPumpAccountingin interfaceIContractWaterSupplyAccounting- Returns:
-
getPumpAccounting
public NavigableMap<Date,IWaterSupplyPumpAccounting> getPumpAccounting(LocationTemplate pumpLocRef, Date startDate, Date endDate) Description copied from interface:IContractWaterSupplyAccountingReturns a windowed accounting for a specified pump location reference using the start and end date.- Specified by:
getPumpAccountingin interfaceIContractWaterSupplyAccounting- Returns:
-
buildPumpAccounting
public NavigableMap<Date,IWaterSupplyPumpAccounting> buildPumpAccounting(LocationTemplate pumpLocationRef) -
mergeAccounting
public void mergeAccounting(IContractWaterSupplyAccounting contractAccounting, boolean generateModifiedTimeWindow, boolean preserveModifiedData) throws DataObjectException Description copied from interface:IContractWaterSupplyAccountingMerges all of the data from the arg contract accounting into this contract accounting.- Specified by:
mergeAccountingin interfaceIContractWaterSupplyAccountinggenerateModifiedTimeWindow- Controls whether a modified time window is generated indicating data to store to the database.- Throws:
DataObjectException
-
removeUndefinedValues
public void removeUndefinedValues()Try to avoid calling this as it will prune undef values that are used w/in the database to control values that need to be deleted -
getPumpTimeWindowMap
Returns the mapping of modified time windows for all of the pumps for this contract.- Specified by:
getPumpTimeWindowMapin interfaceIContractWaterSupplyAccounting- Returns:
-
clearPumpTimeWindowMaps
public void clearPumpTimeWindowMaps()Clears all of the modified time windows.- Specified by:
clearPumpTimeWindowMapsin interfaceIContractWaterSupplyAccounting
-
getTimeWindowMap
Returns a modified time window map for the argument pump location reference.- Specified by:
getTimeWindowMapin interfaceIContractWaterSupplyAccounting- Parameters:
pumpLocRef-- Returns:
-
windowAndLimit
public IContractWaterSupplyAccounting windowAndLimit(Date startTime, Date endTime, boolean headFlag, int rowLimit) Description copied from interface:IContractWaterSupplyAccountingReturns a limited window of this accounting.- Specified by:
windowAndLimitin interfaceIContractWaterSupplyAccounting- Returns:
-