--- /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.chat.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.chat.service.ChatActiveLocalServiceUtil;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Amblard Mathieu
+ */
+public class ChatActiveClp extends BaseModelImpl<ChatActive>
+ implements ChatActive {
+ public ChatActiveClp() {
+ }
+
+ public Class<?> getModelClass() {
+ return ChatActive.class;
+ }
+
+ public String getModelClassName() {
+ return ChatActive.class.getName();
+ }
+
+ public long getPrimaryKey() {
+ return _chatActiveId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setChatActiveId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_chatActiveId);
+ }
+
+ 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("chatActiveId", getChatActiveId());
+ attributes.put("organizationId", getOrganizationId());
+ attributes.put("active", getActive());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long chatActiveId = (Long)attributes.get("chatActiveId");
+
+ if (chatActiveId != null) {
+ setChatActiveId(chatActiveId);
+ }
+
+ Long organizationId = (Long)attributes.get("organizationId");
+
+ if (organizationId != null) {
+ setOrganizationId(organizationId);
+ }
+
+ Boolean active = (Boolean)attributes.get("active");
+
+ if (active != null) {
+ setActive(active);
+ }
+ }
+
+ public long getChatActiveId() {
+ return _chatActiveId;
+ }
+
+ public void setChatActiveId(long chatActiveId) {
+ _chatActiveId = chatActiveId;
+ }
+
+ public long getOrganizationId() {
+ return _organizationId;
+ }
+
+ public void setOrganizationId(long organizationId) {
+ _organizationId = organizationId;
+ }
+
+ public boolean getActive() {
+ return _active;
+ }
+
+ public boolean isActive() {
+ return _active;
+ }
+
+ public void setActive(boolean active) {
+ _active = active;
+ }
+
+ public BaseModel<?> getChatActiveRemoteModel() {
+ return _chatActiveRemoteModel;
+ }
+
+ public void setChatActiveRemoteModel(BaseModel<?> chatActiveRemoteModel) {
+ _chatActiveRemoteModel = chatActiveRemoteModel;
+ }
+
+ public void persist() throws SystemException {
+ if (this.isNew()) {
+ ChatActiveLocalServiceUtil.addChatActive(this);
+ }
+ else {
+ ChatActiveLocalServiceUtil.updateChatActive(this);
+ }
+ }
+
+ @Override
+ public ChatActive toEscapedModel() {
+ return (ChatActive)Proxy.newProxyInstance(ChatActive.class.getClassLoader(),
+ new Class[] { ChatActive.class }, new AutoEscapeBeanHandler(this));
+ }
+
+ @Override
+ public Object clone() {
+ ChatActiveClp clone = new ChatActiveClp();
+
+ clone.setChatActiveId(getChatActiveId());
+ clone.setOrganizationId(getOrganizationId());
+ clone.setActive(getActive());
+
+ return clone;
+ }
+
+ public int compareTo(ChatActive chatActive) {
+ long primaryKey = chatActive.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;
+ }
+
+ ChatActiveClp chatActive = null;
+
+ try {
+ chatActive = (ChatActiveClp)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = chatActive.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(7);
+
+ sb.append("{chatActiveId=");
+ sb.append(getChatActiveId());
+ sb.append(", organizationId=");
+ sb.append(getOrganizationId());
+ sb.append(", active=");
+ sb.append(getActive());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(13);
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.chat.model.ChatActive");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>chatActiveId</column-name><column-value><![CDATA[");
+ sb.append(getChatActiveId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>organizationId</column-name><column-value><![CDATA[");
+ sb.append(getOrganizationId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>active</column-name><column-value><![CDATA[");
+ sb.append(getActive());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private long _chatActiveId;
+ private long _organizationId;
+ private boolean _active;
+ private BaseModel<?> _chatActiveRemoteModel;
+}
\ No newline at end of file