1
22
23 package com.liferay.portal.model.impl;
24
25 import com.liferay.portal.kernel.util.GetterUtil;
26 import com.liferay.portal.model.impl.BaseModelImpl;
27 import com.liferay.portal.util.PropsUtil;
28
29 import com.liferay.util.XSSUtil;
30
31 import java.io.Serializable;
32
33 import java.sql.Types;
34
35 import java.util.Date;
36
37
57 public class UserTrackerPathModelImpl extends BaseModelImpl {
58 public static String TABLE_NAME = "UserTrackerPath";
59 public static Object[][] TABLE_COLUMNS = {
60 { "userTrackerPathId", new Integer(Types.BIGINT) },
61 { "userTrackerId", new Integer(Types.BIGINT) },
62 { "path_", new Integer(Types.VARCHAR) },
63 { "pathDate", new Integer(Types.TIMESTAMP) }
64 };
65 public static String TABLE_SQL_CREATE = "create table UserTrackerPath (userTrackerPathId LONG not null primary key,userTrackerId LONG,path_ STRING null,pathDate DATE null)";
66 public static String TABLE_SQL_DROP = "drop table UserTrackerPath";
67 public static boolean XSS_ALLOW_BY_MODEL = GetterUtil.getBoolean(PropsUtil.get(
68 "xss.allow.com.liferay.portal.model.UserTrackerPath"), XSS_ALLOW);
69 public static boolean XSS_ALLOW_PATH = GetterUtil.getBoolean(PropsUtil.get(
70 "xss.allow.com.liferay.portal.model.UserTrackerPath.path"),
71 XSS_ALLOW_BY_MODEL);
72 public static long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
73 "lock.expiration.time.com.liferay.portal.model.UserTrackerPathModel"));
74
75 public UserTrackerPathModelImpl() {
76 }
77
78 public long getPrimaryKey() {
79 return _userTrackerPathId;
80 }
81
82 public void setPrimaryKey(long pk) {
83 setUserTrackerPathId(pk);
84 }
85
86 public Serializable getPrimaryKeyObj() {
87 return new Long(_userTrackerPathId);
88 }
89
90 public long getUserTrackerPathId() {
91 return _userTrackerPathId;
92 }
93
94 public void setUserTrackerPathId(long userTrackerPathId) {
95 if (userTrackerPathId != _userTrackerPathId) {
96 _userTrackerPathId = userTrackerPathId;
97 }
98 }
99
100 public long getUserTrackerId() {
101 return _userTrackerId;
102 }
103
104 public void setUserTrackerId(long userTrackerId) {
105 if (userTrackerId != _userTrackerId) {
106 _userTrackerId = userTrackerId;
107 }
108 }
109
110 public String getPath() {
111 return GetterUtil.getString(_path);
112 }
113
114 public void setPath(String path) {
115 if (((path == null) && (_path != null)) ||
116 ((path != null) && (_path == null)) ||
117 ((path != null) && (_path != null) && !path.equals(_path))) {
118 if (!XSS_ALLOW_PATH) {
119 path = XSSUtil.strip(path);
120 }
121
122 _path = path;
123 }
124 }
125
126 public Date getPathDate() {
127 return _pathDate;
128 }
129
130 public void setPathDate(Date pathDate) {
131 if (((pathDate == null) && (_pathDate != null)) ||
132 ((pathDate != null) && (_pathDate == null)) ||
133 ((pathDate != null) && (_pathDate != null) &&
134 !pathDate.equals(_pathDate))) {
135 _pathDate = pathDate;
136 }
137 }
138
139 public Object clone() {
140 UserTrackerPathImpl clone = new UserTrackerPathImpl();
141 clone.setUserTrackerPathId(getUserTrackerPathId());
142 clone.setUserTrackerId(getUserTrackerId());
143 clone.setPath(getPath());
144 clone.setPathDate(getPathDate());
145
146 return clone;
147 }
148
149 public int compareTo(Object obj) {
150 if (obj == null) {
151 return -1;
152 }
153
154 UserTrackerPathImpl userTrackerPath = (UserTrackerPathImpl)obj;
155 long pk = userTrackerPath.getPrimaryKey();
156
157 if (getPrimaryKey() < pk) {
158 return -1;
159 }
160 else if (getPrimaryKey() > pk) {
161 return 1;
162 }
163 else {
164 return 0;
165 }
166 }
167
168 public boolean equals(Object obj) {
169 if (obj == null) {
170 return false;
171 }
172
173 UserTrackerPathImpl userTrackerPath = null;
174
175 try {
176 userTrackerPath = (UserTrackerPathImpl)obj;
177 }
178 catch (ClassCastException cce) {
179 return false;
180 }
181
182 long pk = userTrackerPath.getPrimaryKey();
183
184 if (getPrimaryKey() == pk) {
185 return true;
186 }
187 else {
188 return false;
189 }
190 }
191
192 public int hashCode() {
193 return (int)getPrimaryKey();
194 }
195
196 private long _userTrackerPathId;
197 private long _userTrackerId;
198 private String _path;
199 private Date _pathDate;
200 }