1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.flsa;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.joda.time.LocalTime;
22
23 public class FlsaWeek {
24 private List<FlsaDay> flsaDays = new ArrayList<FlsaDay>();
25 private int flsaDayConstant;
26 private LocalTime flsaTime;
27 private LocalTime payPeriodBeginTime;
28
29 public FlsaWeek() {
30
31 }
32
33 public FlsaWeek(int dayConstant, LocalTime flsaTime, LocalTime payPeriodBeginTime) {
34 this.flsaDayConstant = dayConstant;
35 this.flsaTime = flsaTime;
36 this.payPeriodBeginTime = payPeriodBeginTime;
37 }
38
39 public List<FlsaDay> getFlsaDays() {
40 return flsaDays;
41 }
42
43 public void addFlsaDay(FlsaDay flsaDay) {
44 flsaDays.add(flsaDay);
45 }
46
47
48
49
50
51
52
53
54
55
56 public boolean isFirstWeekFull() {
57 if (flsaDays.size() == 7) {
58 return (flsaTime.isBefore(payPeriodBeginTime)) ? false : true;
59 } else {
60 return false;
61 }
62 }
63
64
65
66
67
68
69
70
71
72
73 public boolean isLastWeekFull() {
74 if (flsaDays.size() == 7) {
75 return (flsaTime.isAfter(payPeriodBeginTime)) ? false : true;
76 } else {
77 return false;
78 }
79 }
80
81 public int getFlsaDayConstant() {
82 return flsaDayConstant;
83 }
84
85 public void setFlsaDayConstant(int flsaDayConstant) {
86 this.flsaDayConstant = flsaDayConstant;
87 }
88
89 public LocalTime getFlsaTime() {
90 return flsaTime;
91 }
92
93 public void setFlsaTime(LocalTime flsaTime) {
94 this.flsaTime = flsaTime;
95 }
96 }