--- /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.carnetDAdresses.model.impl;
+
+import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
+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.carnetDAdresses.model.Fiche;
+import com.pentila.entSavoie.carnetDAdresses.model.FicheSoap;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.sql.Types;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * <a href="FicheModelImpl.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>Fiche</code> table
+ * in the database.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.pentila.entSavoie.carnetDAdresses.model.Fiche
+ * @see com.pentila.entSavoie.carnetDAdresses.model.FicheModel
+ * @see com.pentila.entSavoie.carnetDAdresses.model.impl.FicheImpl
+ *
+ */
+public class FicheModelImpl extends BaseModelImpl<Fiche> {
+ public static final String TABLE_NAME = "Fiche";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "ficheId", new Integer(Types.BIGINT) },
+
+
+ { "groupId", new Integer(Types.BIGINT) },
+
+
+ { "relUserId", new Integer(Types.BIGINT) }
+ };
+ public static final String TABLE_SQL_CREATE = "create table Fiche (ficheId LONG not null primary key,groupId LONG,relUserId LONG)";
+ public static final String TABLE_SQL_DROP = "drop table Fiche";
+ 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.carnetDAdresses.model.Fiche"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.carnetDAdresses.model.Fiche"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED_FICHE_LISTE = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
+ "value.object.finder.cache.enabled.Fiche_Liste"), true);
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
+ "lock.expiration.time.com.pentila.entSavoie.carnetDAdresses.model.Fiche"));
+ private long _ficheId;
+ private long _groupId;
+ private long _relUserId;
+ private transient ExpandoBridge _expandoBridge;
+
+ public FicheModelImpl() {
+ }
+
+ public static Fiche toModel(FicheSoap soapModel) {
+ Fiche model = new FicheImpl();
+
+ model.setFicheId(soapModel.getFicheId());
+ model.setGroupId(soapModel.getGroupId());
+ model.setRelUserId(soapModel.getRelUserId());
+
+ return model;
+ }
+
+ public static List<Fiche> toModels(FicheSoap[] soapModels) {
+ List<Fiche> models = new ArrayList<Fiche>(soapModels.length);
+
+ for (FicheSoap soapModel : soapModels) {
+ models.add(toModel(soapModel));
+ }
+
+ return models;
+ }
+
+ public long getPrimaryKey() {
+ return _ficheId;
+ }
+
+ public void setPrimaryKey(long pk) {
+ setFicheId(pk);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_ficheId);
+ }
+
+ public long getFicheId() {
+ return _ficheId;
+ }
+
+ public void setFicheId(long ficheId) {
+ _ficheId = ficheId;
+ }
+
+ public long getGroupId() {
+ return _groupId;
+ }
+
+ public void setGroupId(long groupId) {
+ _groupId = groupId;
+ }
+
+ public long getRelUserId() {
+ return _relUserId;
+ }
+
+ public void setRelUserId(long relUserId) {
+ _relUserId = relUserId;
+ }
+
+ public Fiche toEscapedModel() {
+ if (isEscapedModel()) {
+ return (Fiche) this;
+ } else {
+ Fiche model = new FicheImpl();
+
+ model.setNew(isNew());
+ model.setEscapedModel(true);
+
+ model.setFicheId(getFicheId());
+ model.setGroupId(getGroupId());
+ model.setRelUserId(getRelUserId());
+
+ model = (Fiche) Proxy.newProxyInstance(Fiche.class.getClassLoader(),
+ new Class[] { Fiche.class }, new ReadOnlyBeanHandler(model));
+
+ return model;
+ }
+ }
+
+ public ExpandoBridge getExpandoBridge() {
+ if (_expandoBridge == null) {
+ _expandoBridge = new ExpandoBridgeImpl(Fiche.class.getName(),
+ getPrimaryKey());
+ }
+
+ return _expandoBridge;
+ }
+
+ public Object clone() {
+ FicheImpl clone = new FicheImpl();
+
+ clone.setFicheId(getFicheId());
+ clone.setGroupId(getGroupId());
+ clone.setRelUserId(getRelUserId());
+
+ return clone;
+ }
+
+ public int compareTo(Fiche fiche) {
+ long pk = fiche.getPrimaryKey();
+
+ if (getPrimaryKey() < pk) {
+ return -1;
+ } else if (getPrimaryKey() > pk) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ Fiche fiche = null;
+
+ try {
+ fiche = (Fiche) obj;
+ } catch (ClassCastException cce) {
+ return false;
+ }
+
+ long pk = fiche.getPrimaryKey();
+
+ if (getPrimaryKey() == pk) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return (int) getPrimaryKey();
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("{ficheId=");
+ sb.append(getFicheId());
+ sb.append(", groupId=");
+ sb.append(getGroupId());
+ sb.append(", relUserId=");
+ sb.append(getRelUserId());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.carnetDAdresses.model.Fiche");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>ficheId</column-name><column-value><![CDATA[");
+ sb.append(getFicheId());
+ 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>relUserId</column-name><column-value><![CDATA[");
+ sb.append(getRelUserId());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+}