--- /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.gestionMenus.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.gestionMenus.service.LinkEtabLocalServiceUtil;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author DIMIER Cedric et TARDY Camille
+ */
+public class LinkEtabClp extends BaseModelImpl<LinkEtab> implements LinkEtab {
+ public LinkEtabClp() {
+ }
+
+ public Class<?> getModelClass() {
+ return LinkEtab.class;
+ }
+
+ public String getModelClassName() {
+ return LinkEtab.class.getName();
+ }
+
+ public long getPrimaryKey() {
+ return _linkEtabId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setLinkEtabId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_linkEtabId);
+ }
+
+ 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("linkEtabId", getLinkEtabId());
+ attributes.put("etabId", getEtabId());
+ attributes.put("name", getName());
+ attributes.put("url", getUrl());
+ attributes.put("style", getStyle());
+ attributes.put("orders", getOrders());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long linkEtabId = (Long)attributes.get("linkEtabId");
+
+ if (linkEtabId != null) {
+ setLinkEtabId(linkEtabId);
+ }
+
+ Long etabId = (Long)attributes.get("etabId");
+
+ if (etabId != null) {
+ setEtabId(etabId);
+ }
+
+ String name = (String)attributes.get("name");
+
+ if (name != null) {
+ setName(name);
+ }
+
+ String url = (String)attributes.get("url");
+
+ if (url != null) {
+ setUrl(url);
+ }
+
+ String style = (String)attributes.get("style");
+
+ if (style != null) {
+ setStyle(style);
+ }
+
+ Integer orders = (Integer)attributes.get("orders");
+
+ if (orders != null) {
+ setOrders(orders);
+ }
+ }
+
+ public long getLinkEtabId() {
+ return _linkEtabId;
+ }
+
+ public void setLinkEtabId(long linkEtabId) {
+ _linkEtabId = linkEtabId;
+ }
+
+ public long getEtabId() {
+ return _etabId;
+ }
+
+ public void setEtabId(long etabId) {
+ _etabId = etabId;
+ }
+
+ public String getName() {
+ return _name;
+ }
+
+ public void setName(String name) {
+ _name = name;
+ }
+
+ public String getUrl() {
+ return _url;
+ }
+
+ public void setUrl(String url) {
+ _url = url;
+ }
+
+ public String getStyle() {
+ return _style;
+ }
+
+ public void setStyle(String style) {
+ _style = style;
+ }
+
+ public int getOrders() {
+ return _orders;
+ }
+
+ public void setOrders(int orders) {
+ _orders = orders;
+ }
+
+ public BaseModel<?> getLinkEtabRemoteModel() {
+ return _linkEtabRemoteModel;
+ }
+
+ public void setLinkEtabRemoteModel(BaseModel<?> linkEtabRemoteModel) {
+ _linkEtabRemoteModel = linkEtabRemoteModel;
+ }
+
+ public void persist() throws SystemException {
+ if (this.isNew()) {
+ LinkEtabLocalServiceUtil.addLinkEtab(this);
+ }
+ else {
+ LinkEtabLocalServiceUtil.updateLinkEtab(this);
+ }
+ }
+
+ @Override
+ public LinkEtab toEscapedModel() {
+ return (LinkEtab)Proxy.newProxyInstance(LinkEtab.class.getClassLoader(),
+ new Class[] { LinkEtab.class }, new AutoEscapeBeanHandler(this));
+ }
+
+ @Override
+ public Object clone() {
+ LinkEtabClp clone = new LinkEtabClp();
+
+ clone.setLinkEtabId(getLinkEtabId());
+ clone.setEtabId(getEtabId());
+ clone.setName(getName());
+ clone.setUrl(getUrl());
+ clone.setStyle(getStyle());
+ clone.setOrders(getOrders());
+
+ return clone;
+ }
+
+ public int compareTo(LinkEtab linkEtab) {
+ int value = 0;
+
+ if (getOrders() < linkEtab.getOrders()) {
+ value = -1;
+ }
+ else if (getOrders() > linkEtab.getOrders()) {
+ value = 1;
+ }
+ else {
+ value = 0;
+ }
+
+ if (value != 0) {
+ return value;
+ }
+
+ return 0;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ LinkEtabClp linkEtab = null;
+
+ try {
+ linkEtab = (LinkEtabClp)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = linkEtab.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(13);
+
+ sb.append("{linkEtabId=");
+ sb.append(getLinkEtabId());
+ sb.append(", etabId=");
+ sb.append(getEtabId());
+ sb.append(", name=");
+ sb.append(getName());
+ sb.append(", url=");
+ sb.append(getUrl());
+ sb.append(", style=");
+ sb.append(getStyle());
+ sb.append(", orders=");
+ sb.append(getOrders());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(22);
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.gestionMenus.model.LinkEtab");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>linkEtabId</column-name><column-value><![CDATA[");
+ sb.append(getLinkEtabId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>etabId</column-name><column-value><![CDATA[");
+ sb.append(getEtabId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>name</column-name><column-value><![CDATA[");
+ sb.append(getName());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>url</column-name><column-value><![CDATA[");
+ sb.append(getUrl());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>style</column-name><column-value><![CDATA[");
+ sb.append(getStyle());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>orders</column-name><column-value><![CDATA[");
+ sb.append(getOrders());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private long _linkEtabId;
+ private long _etabId;
+ private String _name;
+ private String _url;
+ private String _style;
+ private int _orders;
+ private BaseModel<?> _linkEtabRemoteModel;
+}
\ No newline at end of file