Class DAOImmediateSchedulingWorkOrderSelect
java.lang.Object
overit.geocall.da.DAO
overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.workorder.data.DAOImmediateSchedulingWorkOrder
overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.workorder.data.DAOImmediateSchedulingWorkOrderSelect
- All Implemented Interfaces:
Serializable,DataAttributesHolder,EDMConfigurableBean,overit.geocall.marks.FieldExposer,overit.geocall.marks.NameExposer,DBFieldMapper,DBObjectMapper,Tool
DAO for selecting and updating immediate scheduling work orders atomically.
This DAO provides a custom UPDATE command that selects work orders by operation center and updates them with processing information in a single atomic operation.
- Since:
- 22.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.workorder.data.DAOImmediateSchedulingWorkOrder
DAOImmediateSchedulingWorkOrder.FieldsNested classes/interfaces inherited from class overit.geocall.da.DAO
DAO.Branch, DAO.Code, DAO.Distinct, DAO.Encrypt, DAO.Factory, DAO.Group, DAO.Level, DAO.Order, DAO.Pk, DAO.Pool, DAO.Sequence, DAO.Service, DAO.Star, DAO.Table, DAO.Transaction -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CommandCustom command for atomic UPDATE that selects and updates work orders.Fields inherited from class overit.geocallapp.wfm.scheduling.bl.immediatescheduling.processing.workorder.data.DAOImmediateSchedulingWorkOrder
TABLEFields inherited from class overit.geocall.da.DAO
_dbfm, _dbom, DELETE_FILTER, DELETE_PK, INSATE, INSERT, INSERT_ATTEMPT, SELECT_FILTER, SELECT_NONE, SELECT_PK, UPDATE_FILTER, UPDATE_PK, UPSERT, V_LEVEL_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddefineSql(CommandContext cc, PoolKit pk) The method creates the SQL command using the language of the criteria, and in particular based on the methodDAO.getFilterCriterion(overit.geocall.da.CommandContext)protected voiddefineValues(CommandContext cc, PoolKit pk) Method to extend to go to prepare the values operating Java side, for example making calculations, avoiding to operate SQL side that is much more difficult, inconvenient, difficult to maintain and not portable.Methods inherited from class overit.geocall.da.DAO
command, command, commandForName, defineParams, defineStatement, execute, execute, execute, execute, feedback, getBranch, getCode, getDataAttributes, getDBFieldMap, getDBObjectMap, getEncrypt, getFactory, getFilterCriterion, getGroup, getLevel, getOrder, getPk, getPool, getSequence, getStar, getTable, getTeacher, getTransaction, getValuesCriterion, hasNotBeenDecorated, haveDBFieldMap, haveDBObjectMap, isDistinct, isEncrypted, isService, markAsDecorated, query, query, scan, setDataAttributes, setDBFieldMap, setDBObjectMap, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.edm.model.DataAttributesHolder
getEntitiesMethods inherited from interface overit.geocall.edm.model.EDMConfigurableBean
getEntity, hasEntity
-
Field Details
-
SELECT_AND_UPDATE
Custom command for atomic UPDATE that selects and updates work orders.This command updates work orders WHERE:
- Operation center matches
- State = TO_BE_PROCESSED OR State = PROCESSED_KO
- Processing counter < max attempts (or NULL)
And sets:
- Processing ID
- Scheduling model ID
- State = IN_PROGRESS
Note: The processing counter is NOT incremented here. It will be incremented by
ImmediateSchedulingWorkOrderHelper.markWorkOrderSuccess(java.lang.Long, java.lang.Long, java.lang.Long)orImmediateSchedulingWorkOrderHelper.markWorkOrderFailed(java.lang.Long, java.lang.String)when the processing completes. This allows distinguishing between transient and permanent errors.
-
-
Constructor Details
-
DAOImmediateSchedulingWorkOrderSelect
public DAOImmediateSchedulingWorkOrderSelect()
-
-
Method Details
-
defineSql
Description copied from class:DAOThe method creates the SQL command using the language of the criteria, and in particular based on the methodDAO.getFilterCriterion(overit.geocall.da.CommandContext)- Overrides:
defineSqlin classDAO- Parameters:
cc- TheCommandContextassociated to the DAOpk- ThePoolKitfrom which extract the connections- Throws:
DAException- If there is a (blocking) data-access error, a DAException must be thrownDAValidateException- If there are error in the validation phase, a DAValidateException must be thrown
-
defineValues
Description copied from class:DAOMethod to extend to go to prepare the values operating Java side, for example making calculations, avoiding to operate SQL side that is much more difficult, inconvenient, difficult to maintain and not portable. Changing the values in this method can have a return in the application mask, since the same map of values is used, and not a clone of it. By default the method sets the correct values for the sequence, the datastamp and login, where necessary.- Overrides:
defineValuesin classDAO- Parameters:
cc- TheCommandContextassociated to the DAOpk- ThePoolKitfrom which extract the connections- Throws:
DAException- If there is a (blocking) data-access error, a DAException must be thrownDAValidateException- If there are error in the validation phase, a DAValidateException must be thrown
-