View Javadoc
1   package org.kuali.ole.select.document;
2   
3   import org.kuali.rice.core.api.CoreApiServiceLocator;
4   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
5   import org.kuali.rice.krad.util.GlobalVariables;
6   
7   import java.sql.Timestamp;
8   
9   /**
10   * Created with IntelliJ IDEA.
11   * User: arjuns
12   * Date: 6/26/13
13   * Time: 5:50 PM
14   * To change this template use File | Settings | File Templates.
15   */
16  
17  
18  public class OLEEResourceEventLog extends PersistableBusinessObjectBase {
19      private String oleEResEventLogID;
20      private String oleERSIdentifier;
21      private String eventType;
22      private Timestamp eventDate;
23      private String eventUser;
24      private String eventNote;
25      private OLEEResourceRecordDocument oleERSDocument;
26  
27      public String getOleEResEventLogID() {
28          return oleEResEventLogID;
29      }
30  
31      public void setOleEResEventLogID(String oleEResEventLogID) {
32          this.oleEResEventLogID = oleEResEventLogID;
33      }
34  
35      public String getOleERSIdentifier() {
36          return oleERSIdentifier;
37      }
38  
39      public void setOleERSIdentifier(String oleERSIdentifier) {
40          this.oleERSIdentifier = oleERSIdentifier;
41      }
42  
43      public String getEventType() {
44          return eventType;
45      }
46  
47      public void setEventType(String eventType) {
48          this.eventType = eventType;
49      }
50  
51      public Timestamp getEventDate() {
52          return eventDate;
53      }
54  
55      public void setEventDate(Timestamp eventDate) {
56          this.eventDate = eventDate;
57      }
58  
59      public String getEventUser() {
60          if (eventUser == null){
61              eventUser= GlobalVariables.getUserSession().getPrincipalName();
62          }
63          return eventUser;
64      }
65  
66      public void setEventUser(String eventUser) {
67          this.eventUser = eventUser;
68      }
69  
70      public String getEventNote() {
71          return eventNote;
72      }
73  
74      public void setEventNote(String eventNote) {
75          this.eventNote = eventNote;
76      }
77  
78      public OLEEResourceRecordDocument getOleERSDocument() {
79          return oleERSDocument;
80      }
81  
82      public void setOleERSDocument(OLEEResourceRecordDocument oleERSDocument) {
83          this.oleERSDocument = oleERSDocument;
84      }
85  
86      /**
87       * set the timestamp attribute value.
88       */
89      public void setCurrentTimeStamp() {
90          final Timestamp now = CoreApiServiceLocator.getDateTimeService().getCurrentTimestamp();
91          this.setEventDate(now);
92      }
93  }