--- /dev/null
+/*******************************************************************************
+ * Copyright © Igor Barma, Alexandre Desoubeaux, Christian Martel, Eric Brun, Mathieu Amblard, Gwenael Gevet, Pierre Guillot, 2012
+ *
+ * This file is part of the work and learning management system Pentila Nero.
+ *
+ * Pentila Nero is free software. You can redistribute it and/or modify since
+ * you respect the terms of either (at least one of the both license) :
+ * - under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ * - the CeCILL-C as published by CeCILL-C; either version 1 of the
+ * License, or any later version
+ * - the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the license,
+ * or (at your option) any later version.
+ *
+ * There are special exceptions to the terms and conditions of the
+ * licenses as they are applied to this software. View the full text of
+ * the exception in file LICENSE-PROJECT.txt in the directory of this software
+ * distribution.
+ *
+ * Pentila Nero 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
+ * Licenses for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * and the CeCILL-C and the GNU Lesser General Public License along with
+ * Pentila Nero. If not, see :
+ * <http://www.gnu.org/licenses/> and
+ * <http://www.cecill.info/licences.fr.html>.
+ ******************************************************************************/
+package com.pentila.entSavoie.gestionPlans.model.impl;
+
+import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
+import com.liferay.portal.kernel.util.DateUtil;
+import com.liferay.portal.kernel.util.GetterUtil;
+import com.liferay.portal.model.impl.BaseModelImpl;
+
+import com.liferay.portlet.expando.model.ExpandoBridge;
+import com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl;
+
+import com.pentila.entSavoie.gestionPlans.model.FormulaireDate;
+import com.pentila.entSavoie.gestionPlans.model.FormulaireDateSoap;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.sql.Types;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * <a href="FormulaireDateModelImpl.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This class is a model that represents the <code>FormulaireDate</code> table
+ * in the database.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.pentila.entSavoie.gestionPlans.model.FormulaireDate
+ * @see com.pentila.entSavoie.gestionPlans.model.FormulaireDateModel
+ * @see com.pentila.entSavoie.gestionPlans.model.impl.FormulaireDateImpl
+ *
+ */
+public class FormulaireDateModelImpl extends BaseModelImpl<FormulaireDate> {
+ public static final String TABLE_NAME = "FormulaireDate";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "formulaireDateId", new Integer(Types.BIGINT) },
+
+
+ { "formulaireId", new Integer(Types.BIGINT) },
+
+
+ { "day", new Integer(Types.TIMESTAMP) },
+
+
+ { "type_", new Integer(Types.INTEGER) },
+
+
+ { "repli", new Integer(Types.BOOLEAN) },
+
+
+ { "besoinMoniteur", new Integer(Types.INTEGER) },
+
+
+ { "forfaits", new Integer(Types.INTEGER) }
+ };
+ public static final String TABLE_SQL_CREATE = "create table FormulaireDate (formulaireDateId LONG not null primary key,formulaireId LONG,day DATE null,type_ INTEGER,repli BOOLEAN,besoinMoniteur INTEGER,forfaits INTEGER)";
+ public static final String TABLE_SQL_DROP = "drop table FormulaireDate";
+ public static final String DATA_SOURCE = "liferayDataSource";
+ public static final String SESSION_FACTORY = "liferaySessionFactory";
+ public static final String TX_MANAGER = "liferayTransactionManager";
+ public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
+ "value.object.entity.cache.enabled.com.pentila.entSavoie.gestionPlans.model.FormulaireDate"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.gestionPlans.model.FormulaireDate"),
+ true);
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
+ "lock.expiration.time.com.pentila.entSavoie.gestionPlans.model.FormulaireDate"));
+ private long _formulaireDateId;
+ private long _formulaireId;
+ private Date _day;
+ private Integer _type;
+ private Boolean _repli;
+ private Integer _besoinMoniteur;
+ private Integer _forfaits;
+ private transient ExpandoBridge _expandoBridge;
+
+ public FormulaireDateModelImpl() {
+ }
+
+ public static FormulaireDate toModel(FormulaireDateSoap soapModel) {
+ FormulaireDate model = new FormulaireDateImpl();
+
+ model.setFormulaireDateId(soapModel.getFormulaireDateId());
+ model.setFormulaireId(soapModel.getFormulaireId());
+ model.setDay(soapModel.getDay());
+ model.setType(soapModel.getType());
+ model.setRepli(soapModel.getRepli());
+ model.setBesoinMoniteur(soapModel.getBesoinMoniteur());
+ model.setForfaits(soapModel.getForfaits());
+
+ return model;
+ }
+
+ public static List<FormulaireDate> toModels(FormulaireDateSoap[] soapModels) {
+ List<FormulaireDate> models = new ArrayList<FormulaireDate>(soapModels.length);
+
+ for (FormulaireDateSoap soapModel : soapModels) {
+ models.add(toModel(soapModel));
+ }
+
+ return models;
+ }
+
+ public long getPrimaryKey() {
+ return _formulaireDateId;
+ }
+
+ public void setPrimaryKey(long pk) {
+ setFormulaireDateId(pk);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_formulaireDateId);
+ }
+
+ public long getFormulaireDateId() {
+ return _formulaireDateId;
+ }
+
+ public void setFormulaireDateId(long formulaireDateId) {
+ _formulaireDateId = formulaireDateId;
+ }
+
+ public long getFormulaireId() {
+ return _formulaireId;
+ }
+
+ public void setFormulaireId(long formulaireId) {
+ _formulaireId = formulaireId;
+ }
+
+ public Date getDay() {
+ return _day;
+ }
+
+ public void setDay(Date day) {
+ _day = day;
+ }
+
+ public Integer getType() {
+ return _type;
+ }
+
+ public void setType(Integer type) {
+ _type = type;
+ }
+
+ public Boolean getRepli() {
+ return _repli;
+ }
+
+ public void setRepli(Boolean repli) {
+ _repli = repli;
+ }
+
+ public Integer getBesoinMoniteur() {
+ return _besoinMoniteur;
+ }
+
+ public void setBesoinMoniteur(Integer besoinMoniteur) {
+ _besoinMoniteur = besoinMoniteur;
+ }
+
+ public Integer getForfaits() {
+ return _forfaits;
+ }
+
+ public void setForfaits(Integer forfaits) {
+ _forfaits = forfaits;
+ }
+
+ public FormulaireDate toEscapedModel() {
+ if (isEscapedModel()) {
+ return (FormulaireDate) this;
+ } else {
+ FormulaireDate model = new FormulaireDateImpl();
+
+ model.setNew(isNew());
+ model.setEscapedModel(true);
+
+ model.setFormulaireDateId(getFormulaireDateId());
+ model.setFormulaireId(getFormulaireId());
+ model.setDay(getDay());
+ model.setType(getType());
+ model.setRepli(getRepli());
+ model.setBesoinMoniteur(getBesoinMoniteur());
+ model.setForfaits(getForfaits());
+
+ model = (FormulaireDate) Proxy.newProxyInstance(FormulaireDate.class.getClassLoader(),
+ new Class[] { FormulaireDate.class },
+ new ReadOnlyBeanHandler(model));
+
+ return model;
+ }
+ }
+
+ public ExpandoBridge getExpandoBridge() {
+ if (_expandoBridge == null) {
+ _expandoBridge = new ExpandoBridgeImpl(FormulaireDate.class.getName(),
+ getPrimaryKey());
+ }
+
+ return _expandoBridge;
+ }
+
+ public Object clone() {
+ FormulaireDateImpl clone = new FormulaireDateImpl();
+
+ clone.setFormulaireDateId(getFormulaireDateId());
+ clone.setFormulaireId(getFormulaireId());
+ clone.setDay(getDay());
+ clone.setType(getType());
+ clone.setRepli(getRepli());
+ clone.setBesoinMoniteur(getBesoinMoniteur());
+ clone.setForfaits(getForfaits());
+
+ return clone;
+ }
+
+ public int compareTo(FormulaireDate formulaireDate) {
+ int value = 0;
+
+ value = DateUtil.compareTo(getDay(), formulaireDate.getDay());
+
+ if (value != 0) {
+ return value;
+ }
+
+ return 0;
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ FormulaireDate formulaireDate = null;
+
+ try {
+ formulaireDate = (FormulaireDate) obj;
+ } catch (ClassCastException cce) {
+ return false;
+ }
+
+ long pk = formulaireDate.getPrimaryKey();
+
+ if (getPrimaryKey() == pk) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return (int) getPrimaryKey();
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("{formulaireDateId=");
+ sb.append(getFormulaireDateId());
+ sb.append(", formulaireId=");
+ sb.append(getFormulaireId());
+ sb.append(", day=");
+ sb.append(getDay());
+ sb.append(", type=");
+ sb.append(getType());
+ sb.append(", repli=");
+ sb.append(getRepli());
+ sb.append(", besoinMoniteur=");
+ sb.append(getBesoinMoniteur());
+ sb.append(", forfaits=");
+ sb.append(getForfaits());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.gestionPlans.model.FormulaireDate");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>formulaireDateId</column-name><column-value><![CDATA[");
+ sb.append(getFormulaireDateId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>formulaireId</column-name><column-value><![CDATA[");
+ sb.append(getFormulaireId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>day</column-name><column-value><![CDATA[");
+ sb.append(getDay());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>type</column-name><column-value><![CDATA[");
+ sb.append(getType());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>repli</column-name><column-value><![CDATA[");
+ sb.append(getRepli());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>besoinMoniteur</column-name><column-value><![CDATA[");
+ sb.append(getBesoinMoniteur());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>forfaits</column-name><column-value><![CDATA[");
+ sb.append(getForfaits());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+}