1 31 32 package org.opencms.workflow; 33 34 import org.opencms.db.CmsDbUtil; 35 import org.opencms.util.CmsUUID; 36 37 46 public class CmsTaskLog { 47 48 49 private String m_comment; 50 51 52 private int m_id = CmsDbUtil.UNKNOWN_ID; 53 54 55 private java.sql.Timestamp m_startTime; 56 57 58 private int m_type; 59 60 61 private CmsUUID m_userId; 62 63 72 public CmsTaskLog(int id, String comment, CmsUUID userId, java.sql.Timestamp starttime, int type) { 73 74 m_id = id; 75 m_comment = comment; 76 m_userId = userId; 77 m_startTime = starttime; 78 m_type = type; 79 } 80 81 84 public boolean equals(Object obj) { 85 86 if (obj == this) { 87 return true; 88 } 89 if (obj instanceof CmsTaskLog) { 90 return ((CmsTaskLog)obj).m_id == m_id; 91 } 92 return false; 93 } 94 95 100 public String getComment() { 101 102 return m_comment; 103 } 104 105 110 public int getId() { 111 112 return m_id; 113 } 114 115 120 public java.sql.Timestamp getStartTime() { 121 122 return m_startTime; 123 } 124 125 130 public int getType() { 131 132 return m_type; 133 } 134 135 140 public CmsUUID getUser() { 141 142 return m_userId; 143 } 144 145 148 public int hashCode() { 149 150 return (new Integer (m_id)).hashCode(); 151 } 152 153 158 public void setComment(String value) { 159 160 m_comment = value; 161 } 162 163 166 public String toString() { 167 168 StringBuffer result = new StringBuffer (); 169 result.append("[TaskLog]"); 170 result.append(" id:"); 171 result.append(getId()); 172 result.append(" comment:"); 173 result.append(getComment()); 174 result.append(" starttime:"); 175 result.append(getStartTime()); 176 result.append(" user:"); 177 result.append(getUser()); 178 if (getType() == CmsTaskService.TASKLOG_SYSTEM) { 179 result.append(" type:system"); 180 } else { 181 result.append(" type:user"); 182 } 183 return result.toString(); 184 } 185 } 186 | Popular Tags |