org.kuali.hr.time.assignment.service
Class AssignmentServiceImpl

java.lang.Object
  extended by org.kuali.hr.time.assignment.service.AssignmentServiceImpl
All Implemented Interfaces:
AssignmentService

public class AssignmentServiceImpl
extends Object
implements AssignmentService


Constructor Summary
AssignmentServiceImpl()
           
 
Method Summary
 List<Assignment> filterAssignments(List<Assignment> assignments, String flsaStatus, boolean chkForLeaveEligible)
          Filter the given list of assignments with given criteria
 List<Assignment> getActiveAssignments(Date asOfDate)
          Get active assignments for all users for the current date CAUTION this method will return a lot of data in a normal production env It is intended to only be used in a batch setting
 List<Assignment> getActiveAssignmentsForJob(String principalId, Long jobNumber, Date asOfDate)
          KPME-1129 Kagata Get a list of active assignments based on principalId and jobNumber as of a particular date
 List<Assignment> getActiveAssignmentsForWorkArea(Long workArea, Date asOfDate)
          Get all active assignments for a work area
 Assignment getAssignment(AssignmentDescriptionKey key, Date asOfDate)
          For a given AssignmentDescriptionKey return the matching assignment.
 Assignment getAssignment(LeaveCalendarDocument leaveCalendarDocument, String assignmentKey)
           
 Assignment getAssignment(List<Assignment> assignments, String assignmentKey, Date beginDate)
           
 Assignment getAssignment(String tkAssignmentId)
          Reverse lookup of an assignment based on the assignment id
 Assignment getAssignment(String principalId, AssignmentDescriptionKey key, Date asOfDate)
          Fetch principal id and key as of a particular date
 Assignment getAssignment(TimesheetDocument timesheetDocument, String assignmentKey)
          Reverse lookup of an assignment based on the assignment key and the document
 AssignmentDao getAssignmentDao()
           
 AssignmentDescriptionKey getAssignmentDescriptionKey(String assignmentKey)
          Get Assignment Description key based off of description
 Map<String,String> getAssignmentDescriptions(Assignment assignment)
          Get all assignment descriptions for an assignment
 Map<String,String> getAssignmentDescriptions(LeaveCalendarDocument lcd)
          Get all assignment descriptions for a document
 Map<String,String> getAssignmentDescriptions(TimesheetDocument td, boolean clockOnlyAssignments)
          Get all assignment descriptions for a document
 Map<String,String> getAssignmentDescriptionsForAssignments(List<Assignment> assignments)
          Get all assignment descriptions for given list of Assignments
 List<Assignment> getAssignments(List<String> workAreaList, Date effdt, Date startDate, Date endDate)
           
 List<Assignment> getAssignments(String principalId, Date asOfDate)
          Fetches a list of Assignments for a given principal Id as of a particular date
 List<Assignment> getAssignments(String principalId, Date beginDate, Date endDate)
           
 List<Assignment> getAssignmentsByCalEntryForLeaveCalendar(String principalId, CalendarEntries payCalendarEntry)
          Get assignments for Leave Calendar by calendar entry
 List<Assignment> getAssignmentsByCalEntryForTimeCalendar(String principalId, CalendarEntries payCalendarEntry)
          Get assignments for Time Calendar by calendar entry
 List<Assignment> getAssignmentsByPayEntry(String principalId, CalendarEntries payCalendarEntry)
          Get assignments by pay calendar entry
 Assignment getAssignmentToApplyScheduledTimeOff(TimesheetDocument timesheetDocument, Date payEndDate)
          Get assignment that applies to primary job of employee to be used in calculating system scheduled time off
 Assignment getMaxTimestampAssignment(String principalId)
           
 List<String> getPrincipalIds(List<String> workAreaList, Date effdt, Date startDate, Date endDate)
          Get list of unique principalIds with given workarea list and dates
 List<Assignment> searchAssignments(Date fromEffdt, Date toEffdt, String principalId, String jobNumber, String dept, String workArea, String active, String showHistory)
           
 void setAssignmentDao(AssignmentDao assignmentDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignmentServiceImpl

public AssignmentServiceImpl()
Method Detail

getAssignmentDao

public AssignmentDao getAssignmentDao()

setAssignmentDao

public void setAssignmentDao(AssignmentDao assignmentDao)

getAssignments

public List<Assignment> getAssignments(String principalId,
                                       Date asOfDate)
Description copied from interface: AssignmentService
Fetches a list of Assignments for a given principal Id as of a particular date

Specified by:
getAssignments in interface AssignmentService
Returns:

getAssignments

public List<Assignment> getAssignments(String principalId,
                                       Date beginDate,
                                       Date endDate)

searchAssignments

public List<Assignment> searchAssignments(Date fromEffdt,
                                          Date toEffdt,
                                          String principalId,
                                          String jobNumber,
                                          String dept,
                                          String workArea,
                                          String active,
                                          String showHistory)
Specified by:
searchAssignments in interface AssignmentService

getAssignmentsByPayEntry

public List<Assignment> getAssignmentsByPayEntry(String principalId,
                                                 CalendarEntries payCalendarEntry)
Description copied from interface: AssignmentService
Get assignments by pay calendar entry

Specified by:
getAssignmentsByPayEntry in interface AssignmentService
Returns:

getAssignmentsByCalEntryForTimeCalendar

public List<Assignment> getAssignmentsByCalEntryForTimeCalendar(String principalId,
                                                                CalendarEntries payCalendarEntry)
Description copied from interface: AssignmentService
Get assignments for Time Calendar by calendar entry

Specified by:
getAssignmentsByCalEntryForTimeCalendar in interface AssignmentService
Returns:

getAssignmentsByCalEntryForLeaveCalendar

public List<Assignment> getAssignmentsByCalEntryForLeaveCalendar(String principalId,
                                                                 CalendarEntries payCalendarEntry)
Description copied from interface: AssignmentService
Get assignments for Leave Calendar by calendar entry

Specified by:
getAssignmentsByCalEntryForLeaveCalendar in interface AssignmentService
Returns:

filterAssignments

public List<Assignment> filterAssignments(List<Assignment> assignments,
                                          String flsaStatus,
                                          boolean chkForLeaveEligible)
Description copied from interface: AssignmentService
Filter the given list of assignments with given criteria

Specified by:
filterAssignments in interface AssignmentService
Returns:
List

getAssignmentDescriptionKey

public AssignmentDescriptionKey getAssignmentDescriptionKey(String assignmentKey)
Description copied from interface: AssignmentService
Get Assignment Description key based off of description

Specified by:
getAssignmentDescriptionKey in interface AssignmentService
Returns:

getAssignmentDescriptions

public Map<String,String> getAssignmentDescriptions(TimesheetDocument td,
                                                    boolean clockOnlyAssignments)
Description copied from interface: AssignmentService
Get all assignment descriptions for a document

Specified by:
getAssignmentDescriptions in interface AssignmentService
Returns:

getAssignmentDescriptions

public Map<String,String> getAssignmentDescriptions(Assignment assignment)
Description copied from interface: AssignmentService
Get all assignment descriptions for an assignment

Specified by:
getAssignmentDescriptions in interface AssignmentService
Returns:

getAssignment

public Assignment getAssignment(TimesheetDocument timesheetDocument,
                                String assignmentKey)
Description copied from interface: AssignmentService
Reverse lookup of an assignment based on the assignment key and the document

Specified by:
getAssignment in interface AssignmentService
Returns:

getAssignment

public Assignment getAssignment(String tkAssignmentId)
Description copied from interface: AssignmentService
Reverse lookup of an assignment based on the assignment id

Specified by:
getAssignment in interface AssignmentService
Returns:

getActiveAssignmentsForWorkArea

public List<Assignment> getActiveAssignmentsForWorkArea(Long workArea,
                                                        Date asOfDate)
Description copied from interface: AssignmentService
Get all active assignments for a work area

Specified by:
getActiveAssignmentsForWorkArea in interface AssignmentService
Returns:

getActiveAssignments

public List<Assignment> getActiveAssignments(Date asOfDate)
Description copied from interface: AssignmentService
Get active assignments for all users for the current date CAUTION this method will return a lot of data in a normal production env It is intended to only be used in a batch setting

Specified by:
getActiveAssignments in interface AssignmentService
Returns:

getAssignment

public Assignment getAssignment(String principalId,
                                AssignmentDescriptionKey key,
                                Date asOfDate)
Description copied from interface: AssignmentService
Fetch principal id and key as of a particular date

Specified by:
getAssignment in interface AssignmentService
Returns:

getAssignment

public Assignment getAssignment(AssignmentDescriptionKey key,
                                Date asOfDate)
Description copied from interface: AssignmentService
For a given AssignmentDescriptionKey return the matching assignment.

Specified by:
getAssignment in interface AssignmentService
Returns:

getActiveAssignmentsForJob

public List<Assignment> getActiveAssignmentsForJob(String principalId,
                                                   Long jobNumber,
                                                   Date asOfDate)
KPME-1129 Kagata Get a list of active assignments based on principalId and jobNumber as of a particular date

Specified by:
getActiveAssignmentsForJob in interface AssignmentService
Returns:

getAssignmentDescriptions

public Map<String,String> getAssignmentDescriptions(LeaveCalendarDocument lcd)
Description copied from interface: AssignmentService
Get all assignment descriptions for a document

Specified by:
getAssignmentDescriptions in interface AssignmentService
Returns:

getAssignmentDescriptionsForAssignments

public Map<String,String> getAssignmentDescriptionsForAssignments(List<Assignment> assignments)
Description copied from interface: AssignmentService
Get all assignment descriptions for given list of Assignments

Specified by:
getAssignmentDescriptionsForAssignments in interface AssignmentService
Returns:

getAssignment

public Assignment getAssignment(LeaveCalendarDocument leaveCalendarDocument,
                                String assignmentKey)
Specified by:
getAssignment in interface AssignmentService

getAssignment

public Assignment getAssignment(List<Assignment> assignments,
                                String assignmentKey,
                                Date beginDate)
Specified by:
getAssignment in interface AssignmentService

getMaxTimestampAssignment

public Assignment getMaxTimestampAssignment(String principalId)
Specified by:
getMaxTimestampAssignment in interface AssignmentService

getAssignmentToApplyScheduledTimeOff

public Assignment getAssignmentToApplyScheduledTimeOff(TimesheetDocument timesheetDocument,
                                                       Date payEndDate)
Description copied from interface: AssignmentService
Get assignment that applies to primary job of employee to be used in calculating system scheduled time off

Specified by:
getAssignmentToApplyScheduledTimeOff in interface AssignmentService
Returns:

getPrincipalIds

public List<String> getPrincipalIds(List<String> workAreaList,
                                    Date effdt,
                                    Date startDate,
                                    Date endDate)
Description copied from interface: AssignmentService
Get list of unique principalIds with given workarea list and dates

Specified by:
getPrincipalIds in interface AssignmentService
Returns:

getAssignments

public List<Assignment> getAssignments(List<String> workAreaList,
                                       Date effdt,
                                       Date startDate,
                                       Date endDate)
Specified by:
getAssignments in interface AssignmentService


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.