Operation Details
Description: This method retrieves the active working pattern of the appropriate type for the specified owner and date.
Sterotype: ns
SQL
SELECT
  workingPatternID,
  userName,
  organisationID,
  locationID,
  startDate,
  endDate,
  defaultStartTime,
  defaultEndTime,
  recordStatusCode,
  workingHoursType,
  versionNo
INTO
  :workingPatternID,
  :userName,
  :organisationID,
  :locationID,
  :startDate,
  :endDate,
  :defaultStartTime,
  :defaultEndTime,
  :recordStatusCode,
  :workingHoursType,
  :versionNo 
FROM
  WorkingPattern 
WHERE 
  (
    userName = :userName 
    OR organisationID = :organisationID 
    OR locationID = :locationID 
  ) 
  AND 
  (
    workingHoursType = :workingHoursType 
  ) 
  AND 
  (
    startDate <= :effectiveDate 
  ) 
  AND 
  (
    
    (
      endDate IS NULL 
    ) 
    OR 
    (
      endDate >= :effectiveDate 
    ) 
  ) 
  AND 
  (
    recordStatusCode = :recordStatusCode 
  )