View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.time.timeblock;
17  
18  import java.sql.Timestamp;
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import org.kuali.hr.time.service.base.TkServiceLocator;
23  import org.kuali.rice.kim.api.identity.Person;
24  
25  public class TimeBlockHistory extends TimeBlock {
26  
27  	/**
28  	 *
29  	 */
30  	private static final long serialVersionUID = 3943771766084238699L;
31  
32  	private String tkTimeBlockHistoryId = null;
33  	private String actionHistory;
34  	private String modifiedByPrincipalId;
35  	private Timestamp timestampModified;
36  	private Person principal;
37  	private Person userPrincipal;
38  	private List<TimeBlockHistoryDetail> timeBlockHistoryDetails = new ArrayList<TimeBlockHistoryDetail>();
39  
40  	public TimeBlockHistory() {
41  	}
42  
43  	public TimeBlockHistory(TimeBlock tb) {
44  		this.setTkTimeBlockId(tb.getTkTimeBlockId());
45  		this.setDocumentId(tb.getDocumentId());
46  		this.setJobNumber(tb.getJobNumber());
47  		this.setWorkArea(tb.getWorkArea());
48  		this.setTask(tb.getTask());
49  		this.setEarnCode(tb.getEarnCode());
50  		this.setBeginTimestamp(tb.getBeginTimestamp());
51  		this.setEndTimestamp(tb.getEndTimestamp());
52  		this.setClockLogCreated(tb.getClockLogCreated());
53  		this.setHours(tb.getHours());
54  		this.setUserPrincipalId(tb.getUserPrincipalId());
55  		this.setPrincipalId(tb.getPrincipalId());
56  		this.setTimestamp(tb.getTimestamp());
57  		this.setBeginTimestampTimezone(tb.getBeginTimestampTimezone());
58  		this.setEndTimestampTimezone(tb.getEndTimestampTimezone());
59  		// add time block history details for this time block history
60  		TkServiceLocator.getTimeBlockHistoryService().addTimeBlockHistoryDetails(this, tb);
61  	}
62  	
63  
64  	public String getTkTimeBlockHistoryId() {
65  		return tkTimeBlockHistoryId;
66  	}
67  	public void setTkTimeBlockHistoryId(String tkTimeBlockHistoryId) {
68  		this.tkTimeBlockHistoryId = tkTimeBlockHistoryId;
69  	}
70  	public String getActionHistory() {
71  		return actionHistory;
72  	}
73  	public void setActionHistory(String actionHistory) {
74  		this.actionHistory = actionHistory;
75  	}
76  	public String getModifiedByPrincipalId() {
77  		return modifiedByPrincipalId;
78  	}
79  	public void setModifiedByPrincipalId(String modifiedByPrincipalId) {
80  		this.modifiedByPrincipalId = modifiedByPrincipalId;
81  	}
82  
83  	public Timestamp getTimestampModified() {
84  		return timestampModified;
85  	}
86  
87  	public void setTimestampModified(Timestamp timestampModified) {
88  		this.timestampModified = timestampModified;
89  	}
90  
91  	public Person getPrincipal() {
92  		return principal;
93  	}
94  
95  	public void setPrincipal(Person principal) {
96  		this.principal = principal;
97  	}
98  
99  	public Person getUserPrincipal() {
100 		return userPrincipal;
101 	}
102 
103 	public void setUserPrincipal(Person userPrincipal) {
104 		this.userPrincipal = userPrincipal;
105 	}
106 
107 	public List<TimeBlockHistoryDetail> getTimeBlockHistoryDetails() {
108 		return timeBlockHistoryDetails;
109 	}
110 
111 	public void setTimeBlockHistoryDetails(List<TimeBlockHistoryDetail> timeBlockHistoryDetails) {
112 		this.timeBlockHistoryDetails = timeBlockHistoryDetails;
113 	}
114 }