Class CrewShellUtils
java.lang.Object
overit.geocallapp.wfm.crewshell.bl.CrewShellUtils
- Direct Known Subclasses:
CrewShellUtils
Utility class for the crew shells.
- Since:
- 16.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BOCrewShellfindCrewShellByDummyUser(Long dummyUserID) Search for aBOCrewShellobject by its dummyUserID (i.e., its value for the column ACSHID_AUSE).static BOCrewShellgetCrewShellByDummyUser(Long dummyUserID, PoolKit pk) Search for aBOCrewShellobject by its dummyUserID (i.e., its value for the column ACSHID_AUSE).getCrewShellDummyUsers(Collection<Long> dummyUserIDs, PoolKit poolKit) Returns the set of dummy user IDs that are associated with crew shells.static List<BOCrewShellComposition> getCrewShellTechnicians(Long crewShellId, Date day, PoolKit poolKit) static List<BOCrewShellComposition> getCrewShellTechnicians(BOCrewShell crewShell, Date day, PoolKit poolKit) Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) for a givenBOCrewShellobject and a givenDatecomposition day.static List<BOCrewShellComposition> getCrewShellTechniciansByDummyUser(Long dummyUserID, Date day) Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) by theBOCrewShellobject's dummyUserID (i.e., its value for the column ACSHID_AUSE).static List<BOCrewShellComposition> getCrewShellTechniciansByDummyUser(Long dummyUserID, Date day, PoolKit poolKit) Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) by theBOCrewShellobject's dummyUserID (i.e., its value for the column ACSHID_AUSE).static BOCrewShellCompositiongetResourceOfACrewShell(Long crewShellResource, Date referenceDate, PoolKit poolKit) static List<BOCrewShellComposition> getResourceOfACrewShell(List<Long> crewShellResources, Date referenceDate, PoolKit poolKit) static booleanisAnyForemanPresent(List<BOCrewShellComposition> crewShellMembers) Checks if at least oneBOCrewShellCompositionobject (i.e., a confirmed technician for a givenDatecomposition date) is the foreman for a confirmedBOCrewShellobject.static booleanisResourceInACrewShell(Long crewShellResource, Date referenceDate, PoolKit poolKit)
-
Constructor Details
-
CrewShellUtils
protected CrewShellUtils()
-
-
Method Details
-
findCrewShellByDummyUser
public static BOCrewShell findCrewShellByDummyUser(Long dummyUserID) throws DAValidateException, DAException Search for aBOCrewShellobject by its dummyUserID (i.e., its value for the column ACSHID_AUSE).- Parameters:
dummyUserID- the foreign key to the AUSER table- Returns:
- the
BOCrewShellobject by its dummyUserID - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
getCrewShellByDummyUser
public static BOCrewShell getCrewShellByDummyUser(Long dummyUserID, PoolKit pk) throws DAValidateException, DAException Search for aBOCrewShellobject by its dummyUserID (i.e., its value for the column ACSHID_AUSE).- Parameters:
dummyUserID- the foreign key to the AUSER tablepk- thePoolKitpoolKit- Returns:
- the
BOCrewShellobject by its dummyUserID - Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
isResourceInACrewShell
public static boolean isResourceInACrewShell(Long crewShellResource, Date referenceDate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getResourceOfACrewShell
public static List<BOCrewShellComposition> getResourceOfACrewShell(List<Long> crewShellResources, Date referenceDate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getResourceOfACrewShell
public static BOCrewShellComposition getResourceOfACrewShell(Long crewShellResource, Date referenceDate, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
getCrewShellTechniciansByDummyUser
public static List<BOCrewShellComposition> getCrewShellTechniciansByDummyUser(Long dummyUserID, Date day) throws DAValidateException, DAException Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) by theBOCrewShellobject's dummyUserID (i.e., its value for the column ACSHID_AUSE).- Parameters:
dummyUserID- the foreign key to the AUSER tableday- theDateconfirmed composition day for theBOCrewShellobject- Returns:
- the list of crew shell's technician
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
getCrewShellTechniciansByDummyUser
public static List<BOCrewShellComposition> getCrewShellTechniciansByDummyUser(Long dummyUserID, Date day, PoolKit poolKit) throws DAValidateException, DAException Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) by theBOCrewShellobject's dummyUserID (i.e., its value for the column ACSHID_AUSE).- Parameters:
dummyUserID- the foreign key to the AUSER tableday- theDateconfirmed composition day for theBOCrewShellobjectpoolKit- thePoolKitpoolKit- Returns:
- the list of crew shell's technician
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
getCrewShellTechnicians
public static List<BOCrewShellComposition> getCrewShellTechnicians(BOCrewShell crewShell, Date day, PoolKit poolKit) throws DAValidateException, DAException Retrieves the list ofBOCrewShellCompositionobjects (i.e., crew shell's technicians) for a givenBOCrewShellobject and a givenDatecomposition day.- Parameters:
crewShell- the givenBOCrewShellobjectday- the givenDateconfirmed composition day for theBOCrewShellobject- Returns:
- the list of crew shell's technician
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-
getCrewShellTechnicians
public static List<BOCrewShellComposition> getCrewShellTechnicians(Long crewShellId, Date day, PoolKit poolKit) throws DAValidateException, DAException - Throws:
DAValidateExceptionDAException
-
isAnyForemanPresent
Checks if at least oneBOCrewShellCompositionobject (i.e., a confirmed technician for a givenDatecomposition date) is the foreman for a confirmedBOCrewShellobject.- Parameters:
crewShellMembers- the list ofBOCrewShellCompositionobjects (i.e., confirmed technicians for a givenDatecomposition date)- Returns:
- true if at least one crew shell's confirmed technician is a foreman, false otherwise
-
getCrewShellDummyUsers
public static Set<Long> getCrewShellDummyUsers(Collection<Long> dummyUserIDs, PoolKit poolKit) throws DAValidateException, DAException Returns the set of dummy user IDs that are associated with crew shells.- Parameters:
dummyUserIDs- collection of dummy user IDs to checkpoolKit- thePoolKitpoolKit- Returns:
- set of dummy user IDs that are crew shells
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionobject is thrown
-