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
53 public class PasswordPolicyRelModelImpl extends BaseModelImpl {
54 public static String TABLE_NAME = "PasswordPolicyRel";
55 public static Object[][] TABLE_COLUMNS = {
56 { "passwordPolicyRelId", new Integer(Types.BIGINT) },
57 { "passwordPolicyId", new Integer(Types.BIGINT) },
58 { "classNameId", new Integer(Types.BIGINT) },
59 { "classPK", new Integer(Types.BIGINT) }
60 };
61 public static String TABLE_SQL_CREATE = "create table PasswordPolicyRel (passwordPolicyRelId LONG not null primary key,passwordPolicyId LONG,classNameId LONG,classPK LONG)";
62 public static String TABLE_SQL_DROP = "drop table PasswordPolicyRel";
63 public static boolean XSS_ALLOW_BY_MODEL = GetterUtil.getBoolean(PropsUtil.get(
64 "xss.allow.com.liferay.portal.model.PasswordPolicyRel"),
65 XSS_ALLOW);
66 public static long LOCK_EXPIRATION_TIME = GetterUtil.getLong(PropsUtil.get(
67 "lock.expiration.time.com.liferay.portal.model.PasswordPolicyRelModel"));
68
69 public PasswordPolicyRelModelImpl() {
70 }
71
72 public long getPrimaryKey() {
73 return _passwordPolicyRelId;
74 }
75
76 public void setPrimaryKey(long pk) {
77 setPasswordPolicyRelId(pk);
78 }
79
80 public Serializable getPrimaryKeyObj() {
81 return new Long(_passwordPolicyRelId);
82 }
83
84 public long getPasswordPolicyRelId() {
85 return _passwordPolicyRelId;
86 }
87
88 public void setPasswordPolicyRelId(long passwordPolicyRelId) {
89 if (passwordPolicyRelId != _passwordPolicyRelId) {
90 _passwordPolicyRelId = passwordPolicyRelId;
91 }
92 }
93
94 public long getPasswordPolicyId() {
95 return _passwordPolicyId;
96 }
97
98 public void setPasswordPolicyId(long passwordPolicyId) {
99 if (passwordPolicyId != _passwordPolicyId) {
100 _passwordPolicyId = passwordPolicyId;
101 }
102 }
103
104 public long getClassNameId() {
105 return _classNameId;
106 }
107
108 public void setClassNameId(long classNameId) {
109 if (classNameId != _classNameId) {
110 _classNameId = classNameId;
111 }
112 }
113
114 public long getClassPK() {
115 return _classPK;
116 }
117
118 public void setClassPK(long classPK) {
119 if (classPK != _classPK) {
120 _classPK = classPK;
121 }
122 }
123
124 public Object clone() {
125 PasswordPolicyRelImpl clone = new PasswordPolicyRelImpl();
126 clone.setPasswordPolicyRelId(getPasswordPolicyRelId());
127 clone.setPasswordPolicyId(getPasswordPolicyId());
128 clone.setClassNameId(getClassNameId());
129 clone.setClassPK(getClassPK());
130
131 return clone;
132 }
133
134 public int compareTo(Object obj) {
135 if (obj == null) {
136 return -1;
137 }
138
139 PasswordPolicyRelImpl passwordPolicyRel = (PasswordPolicyRelImpl)obj;
140 long pk = passwordPolicyRel.getPrimaryKey();
141
142 if (getPrimaryKey() < pk) {
143 return -1;
144 }
145 else if (getPrimaryKey() > pk) {
146 return 1;
147 }
148 else {
149 return 0;
150 }
151 }
152
153 public boolean equals(Object obj) {
154 if (obj == null) {
155 return false;
156 }
157
158 PasswordPolicyRelImpl passwordPolicyRel = null;
159
160 try {
161 passwordPolicyRel = (PasswordPolicyRelImpl)obj;
162 }
163 catch (ClassCastException cce) {
164 return false;
165 }
166
167 long pk = passwordPolicyRel.getPrimaryKey();
168
169 if (getPrimaryKey() == pk) {
170 return true;
171 }
172 else {
173 return false;
174 }
175 }
176
177 public int hashCode() {
178 return (int)getPrimaryKey();
179 }
180
181 private long _passwordPolicyRelId;
182 private long _passwordPolicyId;
183 private long _classNameId;
184 private long _classPK;
185 }