--- /dev/null
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.pentila.entSavoie.userProperties.model;
+
+import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
+import com.liferay.portal.kernel.exception.SystemException;
+import com.liferay.portal.kernel.util.StringBundler;
+import com.liferay.portal.model.BaseModel;
+import com.liferay.portal.model.impl.BaseModelImpl;
+
+import com.pentila.entSavoie.userProperties.service.UserInternalSSOLocalServiceUtil;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Amblard Mathieu - Barma Igor
+ */
+public class UserInternalSSOClp extends BaseModelImpl<UserInternalSSO>
+ implements UserInternalSSO {
+ public UserInternalSSOClp() {
+ }
+
+ public Class<?> getModelClass() {
+ return UserInternalSSO.class;
+ }
+
+ public String getModelClassName() {
+ return UserInternalSSO.class.getName();
+ }
+
+ public long getPrimaryKey() {
+ return _userInternalSSOId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setUserInternalSSOId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_userInternalSSOId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("userInternalSSOId", getUserInternalSSOId());
+ attributes.put("ssoKey", getSsoKey());
+ attributes.put("ssoValue", getSsoValue());
+ attributes.put("timeMarker", getTimeMarker());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long userInternalSSOId = (Long)attributes.get("userInternalSSOId");
+
+ if (userInternalSSOId != null) {
+ setUserInternalSSOId(userInternalSSOId);
+ }
+
+ String ssoKey = (String)attributes.get("ssoKey");
+
+ if (ssoKey != null) {
+ setSsoKey(ssoKey);
+ }
+
+ String ssoValue = (String)attributes.get("ssoValue");
+
+ if (ssoValue != null) {
+ setSsoValue(ssoValue);
+ }
+
+ Date timeMarker = (Date)attributes.get("timeMarker");
+
+ if (timeMarker != null) {
+ setTimeMarker(timeMarker);
+ }
+ }
+
+ public long getUserInternalSSOId() {
+ return _userInternalSSOId;
+ }
+
+ public void setUserInternalSSOId(long userInternalSSOId) {
+ _userInternalSSOId = userInternalSSOId;
+ }
+
+ public String getSsoKey() {
+ return _ssoKey;
+ }
+
+ public void setSsoKey(String ssoKey) {
+ _ssoKey = ssoKey;
+ }
+
+ public String getSsoValue() {
+ return _ssoValue;
+ }
+
+ public void setSsoValue(String ssoValue) {
+ _ssoValue = ssoValue;
+ }
+
+ public Date getTimeMarker() {
+ return _timeMarker;
+ }
+
+ public void setTimeMarker(Date timeMarker) {
+ _timeMarker = timeMarker;
+ }
+
+ public BaseModel<?> getUserInternalSSORemoteModel() {
+ return _userInternalSSORemoteModel;
+ }
+
+ public void setUserInternalSSORemoteModel(
+ BaseModel<?> userInternalSSORemoteModel) {
+ _userInternalSSORemoteModel = userInternalSSORemoteModel;
+ }
+
+ public void persist() throws SystemException {
+ if (this.isNew()) {
+ UserInternalSSOLocalServiceUtil.addUserInternalSSO(this);
+ }
+ else {
+ UserInternalSSOLocalServiceUtil.updateUserInternalSSO(this);
+ }
+ }
+
+ @Override
+ public UserInternalSSO toEscapedModel() {
+ return (UserInternalSSO)Proxy.newProxyInstance(UserInternalSSO.class.getClassLoader(),
+ new Class[] { UserInternalSSO.class },
+ new AutoEscapeBeanHandler(this));
+ }
+
+ @Override
+ public Object clone() {
+ UserInternalSSOClp clone = new UserInternalSSOClp();
+
+ clone.setUserInternalSSOId(getUserInternalSSOId());
+ clone.setSsoKey(getSsoKey());
+ clone.setSsoValue(getSsoValue());
+ clone.setTimeMarker(getTimeMarker());
+
+ return clone;
+ }
+
+ public int compareTo(UserInternalSSO userInternalSSO) {
+ long primaryKey = userInternalSSO.getPrimaryKey();
+
+ if (getPrimaryKey() < primaryKey) {
+ return -1;
+ }
+ else if (getPrimaryKey() > primaryKey) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ UserInternalSSOClp userInternalSSO = null;
+
+ try {
+ userInternalSSO = (UserInternalSSOClp)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = userInternalSSO.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(9);
+
+ sb.append("{userInternalSSOId=");
+ sb.append(getUserInternalSSOId());
+ sb.append(", ssoKey=");
+ sb.append(getSsoKey());
+ sb.append(", ssoValue=");
+ sb.append(getSsoValue());
+ sb.append(", timeMarker=");
+ sb.append(getTimeMarker());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(16);
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.userProperties.model.UserInternalSSO");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>userInternalSSOId</column-name><column-value><![CDATA[");
+ sb.append(getUserInternalSSOId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>ssoKey</column-name><column-value><![CDATA[");
+ sb.append(getSsoKey());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>ssoValue</column-name><column-value><![CDATA[");
+ sb.append(getSsoValue());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>timeMarker</column-name><column-value><![CDATA[");
+ sb.append(getTimeMarker());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private long _userInternalSSOId;
+ private String _ssoKey;
+ private String _ssoValue;
+ private Date _timeMarker;
+ private BaseModel<?> _userInternalSSORemoteModel;
+}
\ No newline at end of file