Class WorkOrder
java.lang.Object
overit.geocallapp.wfm.core.bl.workorder.WorkOrder
- All Implemented Interfaces:
Serializable,Iterable<BOWorkOrderOperation>
Business object representing a work order.
It consists of a header
BOWorkOrderHeader, a technical object TechnicalObject
and a list of operations BOWorkOrderOperation- Since:
- 9.2
- See Also:
- GCApi:
- bo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass representing the work order metadata -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LongSetprotected BOWorkOrderHeaderprotected List<BOWorkOrderOperation> protected TechnicalObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddOperation(BOWorkOrderOperation toAdd) Adds a work order's operation.voidClears operations.findOperation(Predicate<BOWorkOrderOperation> searchFunction) Find the work order's operation by the given search functionReturns the work order's header.getId()Returns the work order's header id.Returns the set of ids of the meters associated to the work ordergetMeta()Returns the work order's metadata.getOperationById(Long operationId) Returns the work order's operation by id.Returns the work order's operations.Returns the work order parent operation.Returns the removed operations.Returns the work order's technical object.booleanChecks if the work order's header is by order.booleanisClosed()Says if the work order is closedbooleanisNew()Checks if the work order is new.iterator()Returns an iterator on the work order's operations.voidLoads the set of ids of the meters associated to the work ordervoidremoveOperation(int index) Removes the work order's operation.voidsetHeader(BOWorkOrderHeader header) Sets the work order's header.voidsetIdImpiantiOdl(LongSet lsIdImpiantiOdl) Sets the ids of the meters associated to the work ordervoidsetOperations(List<BOWorkOrderOperation> operations) Sets the work order's operations.voidsetTechnicalObject(TechnicalObject technicalObject) Sets the work order's technical object.voidsortOperations(Comparator<BOWorkOrderOperation> comparator) Sorts the work order's operations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
header
-
technicalObject
-
operations
-
associatedMeters
-
-
Constructor Details
-
WorkOrder
public WorkOrder()Instantiates a new work order.
-
-
Method Details
-
getMeta
Returns the work order's metadata.- Returns:
- the metadata
- See Also:
-
setOperations
Sets the work order's operations.- Parameters:
operations- the operations
-
getHeader
Returns the work order's header.- Returns:
- the header
-
setHeader
Sets the work order's header.- Parameters:
header- the header
-
isNew
public boolean isNew()Checks if the work order is new.- Returns:
- true, if is new
-
isClosed
public boolean isClosed()Says if the work order is closed- Returns:
- true, if the work order is closed
-
getId
Returns the work order's header id.- Returns:
- the the work order's header id
-
getIdImpiantiOdl
Returns the set of ids of the meters associated to the work order- Returns:
- the set of meters ids
-
loadImpiantiOdl
Loads the set of ids of the meters associated to the work order- Parameters:
conn- the pooled connection
-
setIdImpiantiOdl
Sets the ids of the meters associated to the work order- Parameters:
lsIdImpiantiOdl- the set of meters ids
-
isByOrder
public boolean isByOrder()Checks if the work order's header is by order.- Returns:
- true, if is by order
-
getParentOperation
Returns the work order parent operation.- Returns:
- the parent operation
-
getTechnicalObject
Returns the work order's technical object.- Returns:
- the technical object
-
setTechnicalObject
Sets the work order's technical object.- Parameters:
technicalObject- the technical object
-
getOperations
Returns the work order's operations.- Returns:
- a list of BO work order operation elements of type BOWorkOrderOperation
- See Also:
-
getOperationById
Returns the work order's operation by id.- Parameters:
operationId- the operation id- Returns:
- the operation by id
-
addOperation
Adds a work order's operation.- Parameters:
toAdd- the operation to add
-
removeOperation
public void removeOperation(int index) Removes the work order's operation.- Parameters:
index- the index of the operation to remove
-
clearOperations
public void clearOperations()Clears operations. -
getRemovedOperations
Returns the removed operations.- Returns:
- the removed operations
-
sortOperations
Sorts the work order's operations.- Parameters:
comparator- the comparator
-
findOperation
Find the work order's operation by the given search function- Parameters:
searchFunction- the search function- Returns:
- the BO work order operation
-
iterator
Returns an iterator on the work order's operations.- Specified by:
iteratorin interfaceIterable<BOWorkOrderOperation>- Returns:
- the iterator
-