--- /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.cartable.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.cartable.service.CasierEntryLocalServiceUtil;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Barma Igor - Amblard Mathieu
+ */
+public class CasierEntryClp extends BaseModelImpl<CasierEntry>
+ implements CasierEntry {
+ public CasierEntryClp() {
+ }
+
+ public Class<?> getModelClass() {
+ return CasierEntry.class;
+ }
+
+ public String getModelClassName() {
+ return CasierEntry.class.getName();
+ }
+
+ public long getPrimaryKey() {
+ return _casierEntryId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setCasierEntryId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_casierEntryId);
+ }
+
+ 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("casierEntryId", getCasierEntryId());
+ attributes.put("companyId", getCompanyId());
+ attributes.put("groupId", getGroupId());
+ attributes.put("entryId", getEntryId());
+ attributes.put("isNew", getIsNew());
+ attributes.put("senderId", getSenderId());
+ attributes.put("sendDate", getSendDate());
+ attributes.put("comment", getComment());
+ attributes.put("replied", getReplied());
+ attributes.put("replyable", getReplyable());
+ attributes.put("size", getSize());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long casierEntryId = (Long)attributes.get("casierEntryId");
+
+ if (casierEntryId != null) {
+ setCasierEntryId(casierEntryId);
+ }
+
+ Long companyId = (Long)attributes.get("companyId");
+
+ if (companyId != null) {
+ setCompanyId(companyId);
+ }
+
+ Long groupId = (Long)attributes.get("groupId");
+
+ if (groupId != null) {
+ setGroupId(groupId);
+ }
+
+ Long entryId = (Long)attributes.get("entryId");
+
+ if (entryId != null) {
+ setEntryId(entryId);
+ }
+
+ Boolean isNew = (Boolean)attributes.get("isNew");
+
+ if (isNew != null) {
+ setIsNew(isNew);
+ }
+
+ Long senderId = (Long)attributes.get("senderId");
+
+ if (senderId != null) {
+ setSenderId(senderId);
+ }
+
+ Date sendDate = (Date)attributes.get("sendDate");
+
+ if (sendDate != null) {
+ setSendDate(sendDate);
+ }
+
+ String comment = (String)attributes.get("comment");
+
+ if (comment != null) {
+ setComment(comment);
+ }
+
+ Boolean replied = (Boolean)attributes.get("replied");
+
+ if (replied != null) {
+ setReplied(replied);
+ }
+
+ Boolean replyable = (Boolean)attributes.get("replyable");
+
+ if (replyable != null) {
+ setReplyable(replyable);
+ }
+
+ Long size = (Long)attributes.get("size");
+
+ if (size != null) {
+ setSize(size);
+ }
+ }
+
+ public long getCasierEntryId() {
+ return _casierEntryId;
+ }
+
+ public void setCasierEntryId(long casierEntryId) {
+ _casierEntryId = casierEntryId;
+ }
+
+ public long getCompanyId() {
+ return _companyId;
+ }
+
+ public void setCompanyId(long companyId) {
+ _companyId = companyId;
+ }
+
+ public long getGroupId() {
+ return _groupId;
+ }
+
+ public void setGroupId(long groupId) {
+ _groupId = groupId;
+ }
+
+ public long getEntryId() {
+ return _entryId;
+ }
+
+ public void setEntryId(long entryId) {
+ _entryId = entryId;
+ }
+
+ public boolean getIsNew() {
+ return _isNew;
+ }
+
+ public boolean isIsNew() {
+ return _isNew;
+ }
+
+ public void setIsNew(boolean isNew) {
+ _isNew = isNew;
+ }
+
+ public long getSenderId() {
+ return _senderId;
+ }
+
+ public void setSenderId(long senderId) {
+ _senderId = senderId;
+ }
+
+ public Date getSendDate() {
+ return _sendDate;
+ }
+
+ public void setSendDate(Date sendDate) {
+ _sendDate = sendDate;
+ }
+
+ public String getComment() {
+ return _comment;
+ }
+
+ public void setComment(String comment) {
+ _comment = comment;
+ }
+
+ public boolean getReplied() {
+ return _replied;
+ }
+
+ public boolean isReplied() {
+ return _replied;
+ }
+
+ public void setReplied(boolean replied) {
+ _replied = replied;
+ }
+
+ public boolean getReplyable() {
+ return _replyable;
+ }
+
+ public boolean isReplyable() {
+ return _replyable;
+ }
+
+ public void setReplyable(boolean replyable) {
+ _replyable = replyable;
+ }
+
+ public long getSize() {
+ return _size;
+ }
+
+ public void setSize(long size) {
+ _size = size;
+ }
+
+ public BaseModel<?> getCasierEntryRemoteModel() {
+ return _casierEntryRemoteModel;
+ }
+
+ public void setCasierEntryRemoteModel(BaseModel<?> casierEntryRemoteModel) {
+ _casierEntryRemoteModel = casierEntryRemoteModel;
+ }
+
+ public void persist() throws SystemException {
+ if (this.isNew()) {
+ CasierEntryLocalServiceUtil.addCasierEntry(this);
+ }
+ else {
+ CasierEntryLocalServiceUtil.updateCasierEntry(this);
+ }
+ }
+
+ @Override
+ public CasierEntry toEscapedModel() {
+ return (CasierEntry)Proxy.newProxyInstance(CasierEntry.class.getClassLoader(),
+ new Class[] { CasierEntry.class }, new AutoEscapeBeanHandler(this));
+ }
+
+ @Override
+ public Object clone() {
+ CasierEntryClp clone = new CasierEntryClp();
+
+ clone.setCasierEntryId(getCasierEntryId());
+ clone.setCompanyId(getCompanyId());
+ clone.setGroupId(getGroupId());
+ clone.setEntryId(getEntryId());
+ clone.setIsNew(getIsNew());
+ clone.setSenderId(getSenderId());
+ clone.setSendDate(getSendDate());
+ clone.setComment(getComment());
+ clone.setReplied(getReplied());
+ clone.setReplyable(getReplyable());
+ clone.setSize(getSize());
+
+ return clone;
+ }
+
+ public int compareTo(CasierEntry casierEntry) {
+ long primaryKey = casierEntry.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;
+ }
+
+ CasierEntryClp casierEntry = null;
+
+ try {
+ casierEntry = (CasierEntryClp)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = casierEntry.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(23);
+
+ sb.append("{casierEntryId=");
+ sb.append(getCasierEntryId());
+ sb.append(", companyId=");
+ sb.append(getCompanyId());
+ sb.append(", groupId=");
+ sb.append(getGroupId());
+ sb.append(", entryId=");
+ sb.append(getEntryId());
+ sb.append(", isNew=");
+ sb.append(getIsNew());
+ sb.append(", senderId=");
+ sb.append(getSenderId());
+ sb.append(", sendDate=");
+ sb.append(getSendDate());
+ sb.append(", comment=");
+ sb.append(getComment());
+ sb.append(", replied=");
+ sb.append(getReplied());
+ sb.append(", replyable=");
+ sb.append(getReplyable());
+ sb.append(", size=");
+ sb.append(getSize());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(37);
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.cartable.model.CasierEntry");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>casierEntryId</column-name><column-value><![CDATA[");
+ sb.append(getCasierEntryId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>companyId</column-name><column-value><![CDATA[");
+ sb.append(getCompanyId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>groupId</column-name><column-value><![CDATA[");
+ sb.append(getGroupId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>entryId</column-name><column-value><![CDATA[");
+ sb.append(getEntryId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>isNew</column-name><column-value><![CDATA[");
+ sb.append(getIsNew());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>senderId</column-name><column-value><![CDATA[");
+ sb.append(getSenderId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>sendDate</column-name><column-value><![CDATA[");
+ sb.append(getSendDate());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>comment</column-name><column-value><![CDATA[");
+ sb.append(getComment());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>replied</column-name><column-value><![CDATA[");
+ sb.append(getReplied());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>replyable</column-name><column-value><![CDATA[");
+ sb.append(getReplyable());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>size</column-name><column-value><![CDATA[");
+ sb.append(getSize());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private long _casierEntryId;
+ private long _companyId;
+ private long _groupId;
+ private long _entryId;
+ private boolean _isNew;
+ private long _senderId;
+ private Date _sendDate;
+ private String _comment;
+ private boolean _replied;
+ private boolean _replyable;
+ private long _size;
+ private BaseModel<?> _casierEntryRemoteModel;
+}
\ No newline at end of file