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) void
Clears 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.void
mergeAccounting
(LocationTemplate pumpLocRef, NavigableMap<Date, IWaterSupplyPumpAccounting> accountingMap, boolean generateModifiedTimeWindow, boolean preserveModifiedData) Merge the incoming pump data using a store rule.void
mergeAccounting
(IContractWaterSupplyAccounting contractAccounting, boolean generateModifiedTimeWindow, boolean preserveModifiedData) Merges all of the data from the arg contract accounting into this contract accounting.void
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 deletedvoid
setWaterUserContractRef
(IWaterUserContractRef contractRef) int
size()
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, 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 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:IContractWaterSupplyAccounting
The contract reference for this accounting.- Specified by:
getWaterUserContractRef
in interfaceIContractWaterSupplyAccounting
- Returns:
-
setWaterUserContractRef
-
getAllPumpAccounting
Description copied from interface:IContractWaterSupplyAccounting
Returns all of the pump accounting for this contract.- Specified by:
getAllPumpAccounting
in interfaceIContractWaterSupplyAccounting
- Returns:
-
size
public int size()Description copied from interface:IContractWaterSupplyAccounting
The total number of accountings for this contract accounting instance.- Specified by:
size
in interfaceIContractWaterSupplyAccounting
- Returns:
-
getAllPumpAccounting
public Map<LocationTemplate,NavigableMap<Date, getAllPumpAccountingIWaterSupplyPumpAccounting>> (Date startDate, Date endDate) Description copied from interface:IContractWaterSupplyAccounting
Returns all of the pump accounting for this contract windowed to the start and end dates.- Specified by:
getAllPumpAccounting
in interfaceIContractWaterSupplyAccounting
- Returns:
-
getPumpAccounting
Description copied from interface:IContractWaterSupplyAccounting
Returns the accounting for a specified pump location reference.- Specified by:
getPumpAccounting
in interfaceIContractWaterSupplyAccounting
- Returns:
-
getPumpAccounting
public NavigableMap<Date,IWaterSupplyPumpAccounting> getPumpAccounting(LocationTemplate pumpLocRef, Date startDate, Date endDate) Description copied from interface:IContractWaterSupplyAccounting
Returns a windowed accounting for a specified pump location reference using the start and end date.- Specified by:
getPumpAccounting
in 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:IContractWaterSupplyAccounting
Merges all of the data from the arg contract accounting into this contract accounting.- Specified by:
mergeAccounting
in interfaceIContractWaterSupplyAccounting
generateModifiedTimeWindow
- 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:
getPumpTimeWindowMap
in interfaceIContractWaterSupplyAccounting
- Returns:
-
clearPumpTimeWindowMaps
public void clearPumpTimeWindowMaps()Clears all of the modified time windows.- Specified by:
clearPumpTimeWindowMaps
in interfaceIContractWaterSupplyAccounting
-
getTimeWindowMap
Returns a modified time window map for the argument pump location reference.- Specified by:
getTimeWindowMap
in interfaceIContractWaterSupplyAccounting
- Parameters:
pumpLocRef
-- Returns:
-
windowAndLimit
public IContractWaterSupplyAccounting windowAndLimit(Date startTime, Date endTime, boolean headFlag, int rowLimit) Description copied from interface:IContractWaterSupplyAccounting
Returns a limited window of this accounting.- Specified by:
windowAndLimit
in interfaceIContractWaterSupplyAccounting
- Returns:
-