1
22
23 package com.liferay.portlet.softwarecatalog.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 java.io.Serializable;
30
31 import java.sql.Types;
32
33
53 public class SCProductScreenshotModelImpl extends BaseModelImpl {
54 public static String TABLE_NAME = "SCProductScreenshot";
55 public static Object[][] TABLE_COLUMNS = {
56 { "productScreenshotId", new Integer(Types.BIGINT) },
57 { "companyId", new Integer(Types.BIGINT) },
58 { "groupId", new Integer(Types.BIGINT) },
59 { "productEntryId", new Integer(Types.BIGINT) },
60 { "thumbnailId", new Integer(Types.BIGINT) },
61 { "fullImageId", new Integer(Types.BIGINT) },
62 { "priority", new Integer(Types.INTEGER) }
63 };
64 public static String TABLE_SQL_CREATE = "create table SCProductScreenshot (productScreenshotId LONG not null primary key,companyId LONG,groupId LONG,productEntryId LONG,thumbnailId LONG,fullImageId LONG,priority INTEGER)";
65 public static String TABLE_SQL_DROP = "drop table SCProductScreenshot";
66 public static boolean XSS_ALLOW_BY_MODEL = GetterUtil.getBoolean(PropsUtil.get(
67 "xss.allow.com.liferay.portlet.softwarecatalog.model.SCProductScreenshot"),
68 XSS_ALLOW);
69 public static long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
70 "lock.expiration.time.com.liferay.portlet.softwarecatalog.model.SCProductScreenshotModel"));
71
72 public SCProductScreenshotModelImpl() {
73 }
74
75 public long getPrimaryKey() {
76 return _productScreenshotId;
77 }
78
79 public void setPrimaryKey(long pk) {
80 setProductScreenshotId(pk);
81 }
82
83 public Serializable getPrimaryKeyObj() {
84 return new Long(_productScreenshotId);
85 }
86
87 public long getProductScreenshotId() {
88 return _productScreenshotId;
89 }
90
91 public void setProductScreenshotId(long productScreenshotId) {
92 if (productScreenshotId != _productScreenshotId) {
93 _productScreenshotId = productScreenshotId;
94 }
95 }
96
97 public long getCompanyId() {
98 return _companyId;
99 }
100
101 public void setCompanyId(long companyId) {
102 if (companyId != _companyId) {
103 _companyId = companyId;
104 }
105 }
106
107 public long getGroupId() {
108 return _groupId;
109 }
110
111 public void setGroupId(long groupId) {
112 if (groupId != _groupId) {
113 _groupId = groupId;
114 }
115 }
116
117 public long getProductEntryId() {
118 return _productEntryId;
119 }
120
121 public void setProductEntryId(long productEntryId) {
122 if (productEntryId != _productEntryId) {
123 _productEntryId = productEntryId;
124 }
125 }
126
127 public long getThumbnailId() {
128 return _thumbnailId;
129 }
130
131 public void setThumbnailId(long thumbnailId) {
132 if (thumbnailId != _thumbnailId) {
133 _thumbnailId = thumbnailId;
134 }
135 }
136
137 public long getFullImageId() {
138 return _fullImageId;
139 }
140
141 public void setFullImageId(long fullImageId) {
142 if (fullImageId != _fullImageId) {
143 _fullImageId = fullImageId;
144 }
145 }
146
147 public int getPriority() {
148 return _priority;
149 }
150
151 public void setPriority(int priority) {
152 if (priority != _priority) {
153 _priority = priority;
154 }
155 }
156
157 public Object clone() {
158 SCProductScreenshotImpl clone = new SCProductScreenshotImpl();
159 clone.setProductScreenshotId(getProductScreenshotId());
160 clone.setCompanyId(getCompanyId());
161 clone.setGroupId(getGroupId());
162 clone.setProductEntryId(getProductEntryId());
163 clone.setThumbnailId(getThumbnailId());
164 clone.setFullImageId(getFullImageId());
165 clone.setPriority(getPriority());
166
167 return clone;
168 }
169
170 public int compareTo(Object obj) {
171 if (obj == null) {
172 return -1;
173 }
174
175 SCProductScreenshotImpl scProductScreenshot = (SCProductScreenshotImpl)obj;
176 int value = 0;
177
178 if (getProductEntryId() < scProductScreenshot.getProductEntryId()) {
179 value = -1;
180 }
181 else if (getProductEntryId() > scProductScreenshot.getProductEntryId()) {
182 value = 1;
183 }
184 else {
185 value = 0;
186 }
187
188 if (value != 0) {
189 return value;
190 }
191
192 if (getPriority() < scProductScreenshot.getPriority()) {
193 value = -1;
194 }
195 else if (getPriority() > scProductScreenshot.getPriority()) {
196 value = 1;
197 }
198 else {
199 value = 0;
200 }
201
202 if (value != 0) {
203 return value;
204 }
205
206 return 0;
207 }
208
209 public boolean equals(Object obj) {
210 if (obj == null) {
211 return false;
212 }
213
214 SCProductScreenshotImpl scProductScreenshot = null;
215
216 try {
217 scProductScreenshot = (SCProductScreenshotImpl)obj;
218 }
219 catch (ClassCastException cce) {
220 return false;
221 }
222
223 long pk = scProductScreenshot.getPrimaryKey();
224
225 if (getPrimaryKey() == pk) {
226 return true;
227 }
228 else {
229 return false;
230 }
231 }
232
233 public int hashCode() {
234 return (int)getPrimaryKey();
235 }
236
237 private long _productScreenshotId;
238 private long _companyId;
239 private long _groupId;
240 private long _productEntryId;
241 private long _thumbnailId;
242 private long _fullImageId;
243 private int _priority;
244 }