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