--- /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.cantine.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.cantine.service.CantineCollegeConfigurationLocalServiceUtil;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Mathieu Amblard
+ */
+public class CantineCollegeConfigurationClp extends BaseModelImpl<CantineCollegeConfiguration>
+ implements CantineCollegeConfiguration {
+ public CantineCollegeConfigurationClp() {
+ }
+
+ public Class<?> getModelClass() {
+ return CantineCollegeConfiguration.class;
+ }
+
+ public String getModelClassName() {
+ return CantineCollegeConfiguration.class.getName();
+ }
+
+ public long getPrimaryKey() {
+ return _cantineCollegeConfigurationId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setCantineCollegeConfigurationId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_cantineCollegeConfigurationId);
+ }
+
+ 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("cantineCollegeConfigurationId",
+ getCantineCollegeConfigurationId());
+ attributes.put("etabId", getEtabId());
+ attributes.put("hasMercredi", getHasMercredi());
+ attributes.put("hasSamedi", getHasSamedi());
+ attributes.put("hasDimanche", getHasDimanche());
+ attributes.put("hasInternat", getHasInternat());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long cantineCollegeConfigurationId = (Long)attributes.get(
+ "cantineCollegeConfigurationId");
+
+ if (cantineCollegeConfigurationId != null) {
+ setCantineCollegeConfigurationId(cantineCollegeConfigurationId);
+ }
+
+ Long etabId = (Long)attributes.get("etabId");
+
+ if (etabId != null) {
+ setEtabId(etabId);
+ }
+
+ Boolean hasMercredi = (Boolean)attributes.get("hasMercredi");
+
+ if (hasMercredi != null) {
+ setHasMercredi(hasMercredi);
+ }
+
+ Boolean hasSamedi = (Boolean)attributes.get("hasSamedi");
+
+ if (hasSamedi != null) {
+ setHasSamedi(hasSamedi);
+ }
+
+ Boolean hasDimanche = (Boolean)attributes.get("hasDimanche");
+
+ if (hasDimanche != null) {
+ setHasDimanche(hasDimanche);
+ }
+
+ Boolean hasInternat = (Boolean)attributes.get("hasInternat");
+
+ if (hasInternat != null) {
+ setHasInternat(hasInternat);
+ }
+ }
+
+ public long getCantineCollegeConfigurationId() {
+ return _cantineCollegeConfigurationId;
+ }
+
+ public void setCantineCollegeConfigurationId(
+ long cantineCollegeConfigurationId) {
+ _cantineCollegeConfigurationId = cantineCollegeConfigurationId;
+ }
+
+ public long getEtabId() {
+ return _etabId;
+ }
+
+ public void setEtabId(long etabId) {
+ _etabId = etabId;
+ }
+
+ public boolean getHasMercredi() {
+ return _hasMercredi;
+ }
+
+ public boolean isHasMercredi() {
+ return _hasMercredi;
+ }
+
+ public void setHasMercredi(boolean hasMercredi) {
+ _hasMercredi = hasMercredi;
+ }
+
+ public boolean getHasSamedi() {
+ return _hasSamedi;
+ }
+
+ public boolean isHasSamedi() {
+ return _hasSamedi;
+ }
+
+ public void setHasSamedi(boolean hasSamedi) {
+ _hasSamedi = hasSamedi;
+ }
+
+ public boolean getHasDimanche() {
+ return _hasDimanche;
+ }
+
+ public boolean isHasDimanche() {
+ return _hasDimanche;
+ }
+
+ public void setHasDimanche(boolean hasDimanche) {
+ _hasDimanche = hasDimanche;
+ }
+
+ public boolean getHasInternat() {
+ return _hasInternat;
+ }
+
+ public boolean isHasInternat() {
+ return _hasInternat;
+ }
+
+ public void setHasInternat(boolean hasInternat) {
+ _hasInternat = hasInternat;
+ }
+
+ public BaseModel<?> getCantineCollegeConfigurationRemoteModel() {
+ return _cantineCollegeConfigurationRemoteModel;
+ }
+
+ public void setCantineCollegeConfigurationRemoteModel(
+ BaseModel<?> cantineCollegeConfigurationRemoteModel) {
+ _cantineCollegeConfigurationRemoteModel = cantineCollegeConfigurationRemoteModel;
+ }
+
+ public void persist() throws SystemException {
+ if (this.isNew()) {
+ CantineCollegeConfigurationLocalServiceUtil.addCantineCollegeConfiguration(this);
+ }
+ else {
+ CantineCollegeConfigurationLocalServiceUtil.updateCantineCollegeConfiguration(this);
+ }
+ }
+
+ @Override
+ public CantineCollegeConfiguration toEscapedModel() {
+ return (CantineCollegeConfiguration)Proxy.newProxyInstance(CantineCollegeConfiguration.class.getClassLoader(),
+ new Class[] { CantineCollegeConfiguration.class },
+ new AutoEscapeBeanHandler(this));
+ }
+
+ @Override
+ public Object clone() {
+ CantineCollegeConfigurationClp clone = new CantineCollegeConfigurationClp();
+
+ clone.setCantineCollegeConfigurationId(getCantineCollegeConfigurationId());
+ clone.setEtabId(getEtabId());
+ clone.setHasMercredi(getHasMercredi());
+ clone.setHasSamedi(getHasSamedi());
+ clone.setHasDimanche(getHasDimanche());
+ clone.setHasInternat(getHasInternat());
+
+ return clone;
+ }
+
+ public int compareTo(
+ CantineCollegeConfiguration cantineCollegeConfiguration) {
+ long primaryKey = cantineCollegeConfiguration.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;
+ }
+
+ CantineCollegeConfigurationClp cantineCollegeConfiguration = null;
+
+ try {
+ cantineCollegeConfiguration = (CantineCollegeConfigurationClp)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = cantineCollegeConfiguration.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("{cantineCollegeConfigurationId=");
+ sb.append(getCantineCollegeConfigurationId());
+ sb.append(", etabId=");
+ sb.append(getEtabId());
+ sb.append(", hasMercredi=");
+ sb.append(getHasMercredi());
+ sb.append(", hasSamedi=");
+ sb.append(getHasSamedi());
+ sb.append(", hasDimanche=");
+ sb.append(getHasDimanche());
+ sb.append(", hasInternat=");
+ sb.append(getHasInternat());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(22);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.cantine.model.CantineCollegeConfiguration");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>cantineCollegeConfigurationId</column-name><column-value><![CDATA[");
+ sb.append(getCantineCollegeConfigurationId());
+ 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>hasMercredi</column-name><column-value><![CDATA[");
+ sb.append(getHasMercredi());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>hasSamedi</column-name><column-value><![CDATA[");
+ sb.append(getHasSamedi());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>hasDimanche</column-name><column-value><![CDATA[");
+ sb.append(getHasDimanche());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>hasInternat</column-name><column-value><![CDATA[");
+ sb.append(getHasInternat());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private long _cantineCollegeConfigurationId;
+ private long _etabId;
+ private boolean _hasMercredi;
+ private boolean _hasSamedi;
+ private boolean _hasDimanche;
+ private boolean _hasInternat;
+ private BaseModel<?> _cantineCollegeConfigurationRemoteModel;
+}
\ No newline at end of file