001
014
015 package com.liferay.portal.model.impl;
016
017 import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
018 import com.liferay.portal.kernel.util.GetterUtil;
019 import com.liferay.portal.kernel.util.StringBundler;
020 import com.liferay.portal.kernel.util.StringPool;
021 import com.liferay.portal.model.UserTrackerPath;
022 import com.liferay.portal.model.UserTrackerPathModel;
023 import com.liferay.portal.service.ServiceContext;
024
025 import com.liferay.portlet.expando.model.ExpandoBridge;
026 import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
027
028 import java.io.Serializable;
029
030 import java.lang.reflect.Proxy;
031
032 import java.sql.Types;
033
034 import java.util.Date;
035
036
053 public class UserTrackerPathModelImpl extends BaseModelImpl<UserTrackerPath>
054 implements UserTrackerPathModel {
055 public static final String TABLE_NAME = "UserTrackerPath";
056 public static final Object[][] TABLE_COLUMNS = {
057 { "userTrackerPathId", new Integer(Types.BIGINT) },
058 { "userTrackerId", new Integer(Types.BIGINT) },
059 { "path_", new Integer(Types.VARCHAR) },
060 { "pathDate", new Integer(Types.TIMESTAMP) }
061 };
062 public static final String TABLE_SQL_CREATE = "create table UserTrackerPath (userTrackerPathId LONG not null primary key,userTrackerId LONG,path_ STRING null,pathDate DATE null)";
063 public static final String TABLE_SQL_DROP = "drop table UserTrackerPath";
064 public static final String DATA_SOURCE = "liferayDataSource";
065 public static final String SESSION_FACTORY = "liferaySessionFactory";
066 public static final String TX_MANAGER = "liferayTransactionManager";
067 public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
068 "value.object.entity.cache.enabled.com.liferay.portal.model.UserTrackerPath"),
069 true);
070 public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
071 "value.object.finder.cache.enabled.com.liferay.portal.model.UserTrackerPath"),
072 true);
073 public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
074 "lock.expiration.time.com.liferay.portal.model.UserTrackerPath"));
075
076 public UserTrackerPathModelImpl() {
077 }
078
079 public long getPrimaryKey() {
080 return _userTrackerPathId;
081 }
082
083 public void setPrimaryKey(long pk) {
084 setUserTrackerPathId(pk);
085 }
086
087 public Serializable getPrimaryKeyObj() {
088 return new Long(_userTrackerPathId);
089 }
090
091 public long getUserTrackerPathId() {
092 return _userTrackerPathId;
093 }
094
095 public void setUserTrackerPathId(long userTrackerPathId) {
096 _userTrackerPathId = userTrackerPathId;
097 }
098
099 public long getUserTrackerId() {
100 return _userTrackerId;
101 }
102
103 public void setUserTrackerId(long userTrackerId) {
104 _userTrackerId = userTrackerId;
105 }
106
107 public String getPath() {
108 if (_path == null) {
109 return StringPool.BLANK;
110 }
111 else {
112 return _path;
113 }
114 }
115
116 public void setPath(String path) {
117 _path = path;
118 }
119
120 public Date getPathDate() {
121 return _pathDate;
122 }
123
124 public void setPathDate(Date pathDate) {
125 _pathDate = pathDate;
126 }
127
128 public UserTrackerPath toEscapedModel() {
129 if (isEscapedModel()) {
130 return (UserTrackerPath)this;
131 }
132 else {
133 return (UserTrackerPath)Proxy.newProxyInstance(UserTrackerPath.class.getClassLoader(),
134 new Class[] { UserTrackerPath.class },
135 new AutoEscapeBeanHandler(this));
136 }
137 }
138
139 public ExpandoBridge getExpandoBridge() {
140 if (_expandoBridge == null) {
141 _expandoBridge = ExpandoBridgeFactoryUtil.getExpandoBridge(0,
142 UserTrackerPath.class.getName(), getPrimaryKey());
143 }
144
145 return _expandoBridge;
146 }
147
148 public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
149 getExpandoBridge().setAttributes(serviceContext);
150 }
151
152 public Object clone() {
153 UserTrackerPathImpl userTrackerPathImpl = new UserTrackerPathImpl();
154
155 userTrackerPathImpl.setUserTrackerPathId(getUserTrackerPathId());
156
157 userTrackerPathImpl.setUserTrackerId(getUserTrackerId());
158
159 userTrackerPathImpl.setPath(getPath());
160
161 userTrackerPathImpl.setPathDate(getPathDate());
162
163 return userTrackerPathImpl;
164 }
165
166 public int compareTo(UserTrackerPath userTrackerPath) {
167 long pk = userTrackerPath.getPrimaryKey();
168
169 if (getPrimaryKey() < pk) {
170 return -1;
171 }
172 else if (getPrimaryKey() > pk) {
173 return 1;
174 }
175 else {
176 return 0;
177 }
178 }
179
180 public boolean equals(Object obj) {
181 if (obj == null) {
182 return false;
183 }
184
185 UserTrackerPath userTrackerPath = null;
186
187 try {
188 userTrackerPath = (UserTrackerPath)obj;
189 }
190 catch (ClassCastException cce) {
191 return false;
192 }
193
194 long pk = userTrackerPath.getPrimaryKey();
195
196 if (getPrimaryKey() == pk) {
197 return true;
198 }
199 else {
200 return false;
201 }
202 }
203
204 public int hashCode() {
205 return (int)getPrimaryKey();
206 }
207
208 public String toString() {
209 StringBundler sb = new StringBundler(9);
210
211 sb.append("{userTrackerPathId=");
212 sb.append(getUserTrackerPathId());
213 sb.append(", userTrackerId=");
214 sb.append(getUserTrackerId());
215 sb.append(", path=");
216 sb.append(getPath());
217 sb.append(", pathDate=");
218 sb.append(getPathDate());
219 sb.append("}");
220
221 return sb.toString();
222 }
223
224 public String toXmlString() {
225 StringBundler sb = new StringBundler(16);
226
227 sb.append("<model><model-name>");
228 sb.append("com.liferay.portal.model.UserTrackerPath");
229 sb.append("</model-name>");
230
231 sb.append(
232 "<column><column-name>userTrackerPathId</column-name><column-value><![CDATA[");
233 sb.append(getUserTrackerPathId());
234 sb.append("]]></column-value></column>");
235 sb.append(
236 "<column><column-name>userTrackerId</column-name><column-value><![CDATA[");
237 sb.append(getUserTrackerId());
238 sb.append("]]></column-value></column>");
239 sb.append(
240 "<column><column-name>path</column-name><column-value><![CDATA[");
241 sb.append(getPath());
242 sb.append("]]></column-value></column>");
243 sb.append(
244 "<column><column-name>pathDate</column-name><column-value><![CDATA[");
245 sb.append(getPathDate());
246 sb.append("]]></column-value></column>");
247
248 sb.append("</model>");
249
250 return sb.toString();
251 }
252
253 private long _userTrackerPathId;
254 private long _userTrackerId;
255 private String _path;
256 private Date _pathDate;
257 private transient ExpandoBridge _expandoBridge;
258 }