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 java.io.Serializable;
30
31 import java.sql.Types;
32
33 import java.util.Date;
34
35
55 public class ReleaseModelImpl extends BaseModelImpl {
56 public static String TABLE_NAME = "Release_";
57 public static Object[][] TABLE_COLUMNS = {
58 { "releaseId", new Integer(Types.BIGINT) },
59 { "createDate", new Integer(Types.TIMESTAMP) },
60 { "modifiedDate", new Integer(Types.TIMESTAMP) },
61 { "buildNumber", new Integer(Types.INTEGER) },
62 { "buildDate", new Integer(Types.TIMESTAMP) },
63 { "verified", new Integer(Types.BOOLEAN) }
64 };
65 public static String TABLE_SQL_CREATE = "create table Release_ (releaseId LONG not null primary key,createDate DATE null,modifiedDate DATE null,buildNumber INTEGER,buildDate DATE null,verified BOOLEAN)";
66 public static String TABLE_SQL_DROP = "drop table Release_";
67 public static boolean XSS_ALLOW_BY_MODEL = GetterUtil.getBoolean(PropsUtil.get(
68 "xss.allow.com.liferay.portal.model.Release"), XSS_ALLOW);
69 public static long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
70 "lock.expiration.time.com.liferay.portal.model.ReleaseModel"));
71
72 public ReleaseModelImpl() {
73 }
74
75 public long getPrimaryKey() {
76 return _releaseId;
77 }
78
79 public void setPrimaryKey(long pk) {
80 setReleaseId(pk);
81 }
82
83 public Serializable getPrimaryKeyObj() {
84 return new Long(_releaseId);
85 }
86
87 public long getReleaseId() {
88 return _releaseId;
89 }
90
91 public void setReleaseId(long releaseId) {
92 if (releaseId != _releaseId) {
93 _releaseId = releaseId;
94 }
95 }
96
97 public Date getCreateDate() {
98 return _createDate;
99 }
100
101 public void setCreateDate(Date createDate) {
102 if (((createDate == null) && (_createDate != null)) ||
103 ((createDate != null) && (_createDate == null)) ||
104 ((createDate != null) && (_createDate != null) &&
105 !createDate.equals(_createDate))) {
106 _createDate = createDate;
107 }
108 }
109
110 public Date getModifiedDate() {
111 return _modifiedDate;
112 }
113
114 public void setModifiedDate(Date modifiedDate) {
115 if (((modifiedDate == null) && (_modifiedDate != null)) ||
116 ((modifiedDate != null) && (_modifiedDate == null)) ||
117 ((modifiedDate != null) && (_modifiedDate != null) &&
118 !modifiedDate.equals(_modifiedDate))) {
119 _modifiedDate = modifiedDate;
120 }
121 }
122
123 public int getBuildNumber() {
124 return _buildNumber;
125 }
126
127 public void setBuildNumber(int buildNumber) {
128 if (buildNumber != _buildNumber) {
129 _buildNumber = buildNumber;
130 }
131 }
132
133 public Date getBuildDate() {
134 return _buildDate;
135 }
136
137 public void setBuildDate(Date buildDate) {
138 if (((buildDate == null) && (_buildDate != null)) ||
139 ((buildDate != null) && (_buildDate == null)) ||
140 ((buildDate != null) && (_buildDate != null) &&
141 !buildDate.equals(_buildDate))) {
142 _buildDate = buildDate;
143 }
144 }
145
146 public boolean getVerified() {
147 return _verified;
148 }
149
150 public boolean isVerified() {
151 return _verified;
152 }
153
154 public void setVerified(boolean verified) {
155 if (verified != _verified) {
156 _verified = verified;
157 }
158 }
159
160 public Object clone() {
161 ReleaseImpl clone = new ReleaseImpl();
162 clone.setReleaseId(getReleaseId());
163 clone.setCreateDate(getCreateDate());
164 clone.setModifiedDate(getModifiedDate());
165 clone.setBuildNumber(getBuildNumber());
166 clone.setBuildDate(getBuildDate());
167 clone.setVerified(getVerified());
168
169 return clone;
170 }
171
172 public int compareTo(Object obj) {
173 if (obj == null) {
174 return -1;
175 }
176
177 ReleaseImpl release = (ReleaseImpl)obj;
178 long pk = release.getPrimaryKey();
179
180 if (getPrimaryKey() < pk) {
181 return -1;
182 }
183 else if (getPrimaryKey() > pk) {
184 return 1;
185 }
186 else {
187 return 0;
188 }
189 }
190
191 public boolean equals(Object obj) {
192 if (obj == null) {
193 return false;
194 }
195
196 ReleaseImpl release = null;
197
198 try {
199 release = (ReleaseImpl)obj;
200 }
201 catch (ClassCastException cce) {
202 return false;
203 }
204
205 long pk = release.getPrimaryKey();
206
207 if (getPrimaryKey() == pk) {
208 return true;
209 }
210 else {
211 return false;
212 }
213 }
214
215 public int hashCode() {
216 return (int)getPrimaryKey();
217 }
218
219 private long _releaseId;
220 private Date _createDate;
221 private Date _modifiedDate;
222 private int _buildNumber;
223 private Date _buildDate;
224 private boolean _verified;
225 }