--- /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.rss.model.impl;
+
+import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
+import com.liferay.portal.kernel.util.GetterUtil;
+import com.liferay.portal.kernel.util.HtmlUtil;
+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.rss.model.RssChanel;
+import com.pentila.entSavoie.rss.model.RssChanelSoap;
+
+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="RssChanelModelImpl.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>RssChanel</code> table
+ * in the database.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.pentila.entSavoie.rss.model.RssChanel
+ * @see com.pentila.entSavoie.rss.model.RssChanelModel
+ * @see com.pentila.entSavoie.rss.model.impl.RssChanelImpl
+ *
+ */
+public class RssChanelModelImpl extends BaseModelImpl<RssChanel> {
+ public static final String TABLE_NAME = "RssChanel";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "chanelId", new Integer(Types.BIGINT) },
+
+
+ { "userId", new Integer(Types.BIGINT) },
+
+
+ { "url", new Integer(Types.VARCHAR) },
+
+
+ { "title", new Integer(Types.VARCHAR) },
+
+
+ { "description", new Integer(Types.VARCHAR) },
+
+
+ { "link", new Integer(Types.VARCHAR) },
+
+
+ { "urlImage", new Integer(Types.VARCHAR) },
+
+
+ { "pubDate", new Integer(Types.TIMESTAMP) },
+
+
+ { "lastBuildDate", new Integer(Types.TIMESTAMP) },
+
+
+ { "active_", new Integer(Types.BOOLEAN) }
+ };
+ public static final String TABLE_SQL_CREATE = "create table RssChanel (chanelId LONG not null primary key,userId LONG,url VARCHAR(75) null,title VARCHAR(75) null,description VARCHAR(75) null,link VARCHAR(75) null,urlImage VARCHAR(75) null,pubDate DATE null,lastBuildDate DATE null,active_ BOOLEAN)";
+ public static final String TABLE_SQL_DROP = "drop table RssChanel";
+ 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.rss.model.RssChanel"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.portal.util.PropsUtil.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.rss.model.RssChanel"),
+ true);
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.portal.util.PropsUtil.get(
+ "lock.expiration.time.com.pentila.entSavoie.rss.model.RssChanel"));
+ private long _chanelId;
+ private long _userId;
+ private String _url;
+ private String _title;
+ private String _description;
+ private String _link;
+ private String _urlImage;
+ private Date _pubDate;
+ private Date _lastBuildDate;
+ private boolean _active;
+ private transient ExpandoBridge _expandoBridge;
+
+ public RssChanelModelImpl() {
+ }
+
+ public static RssChanel toModel(RssChanelSoap soapModel) {
+ RssChanel model = new RssChanelImpl();
+
+ model.setChanelId(soapModel.getChanelId());
+ model.setUserId(soapModel.getUserId());
+ model.setUrl(soapModel.getUrl());
+ model.setTitle(soapModel.getTitle());
+ model.setDescription(soapModel.getDescription());
+ model.setLink(soapModel.getLink());
+ model.setUrlImage(soapModel.getUrlImage());
+ model.setPubDate(soapModel.getPubDate());
+ model.setLastBuildDate(soapModel.getLastBuildDate());
+ model.setActive(soapModel.getActive());
+
+ return model;
+ }
+
+ public static List<RssChanel> toModels(RssChanelSoap[] soapModels) {
+ List<RssChanel> models = new ArrayList<RssChanel>(soapModels.length);
+
+ for (RssChanelSoap soapModel : soapModels) {
+ models.add(toModel(soapModel));
+ }
+
+ return models;
+ }
+
+ public long getPrimaryKey() {
+ return _chanelId;
+ }
+
+ public void setPrimaryKey(long pk) {
+ setChanelId(pk);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_chanelId);
+ }
+
+ public long getChanelId() {
+ return _chanelId;
+ }
+
+ public void setChanelId(long chanelId) {
+ _chanelId = chanelId;
+ }
+
+ public long getUserId() {
+ return _userId;
+ }
+
+ public void setUserId(long userId) {
+ _userId = userId;
+ }
+
+ public String getUrl() {
+ return GetterUtil.getString(_url);
+ }
+
+ public void setUrl(String url) {
+ _url = url;
+ }
+
+ public String getTitle() {
+ return GetterUtil.getString(_title);
+ }
+
+ public void setTitle(String title) {
+ _title = title;
+ }
+
+ public String getDescription() {
+ return GetterUtil.getString(_description);
+ }
+
+ public void setDescription(String description) {
+ _description = description;
+ }
+
+ public String getLink() {
+ return GetterUtil.getString(_link);
+ }
+
+ public void setLink(String link) {
+ _link = link;
+ }
+
+ public String getUrlImage() {
+ return GetterUtil.getString(_urlImage);
+ }
+
+ public void setUrlImage(String urlImage) {
+ _urlImage = urlImage;
+ }
+
+ public Date getPubDate() {
+ return _pubDate;
+ }
+
+ public void setPubDate(Date pubDate) {
+ _pubDate = pubDate;
+ }
+
+ public Date getLastBuildDate() {
+ return _lastBuildDate;
+ }
+
+ public void setLastBuildDate(Date lastBuildDate) {
+ _lastBuildDate = lastBuildDate;
+ }
+
+ public boolean getActive() {
+ return _active;
+ }
+
+ public boolean isActive() {
+ return _active;
+ }
+
+ public void setActive(boolean active) {
+ _active = active;
+ }
+
+ public RssChanel toEscapedModel() {
+ if (isEscapedModel()) {
+ return (RssChanel) this;
+ } else {
+ RssChanel model = new RssChanelImpl();
+
+ model.setNew(isNew());
+ model.setEscapedModel(true);
+
+ model.setChanelId(getChanelId());
+ model.setUserId(getUserId());
+ model.setUrl(HtmlUtil.escape(getUrl()));
+ model.setTitle(HtmlUtil.escape(getTitle()));
+ model.setDescription(HtmlUtil.escape(getDescription()));
+ model.setLink(HtmlUtil.escape(getLink()));
+ model.setUrlImage(HtmlUtil.escape(getUrlImage()));
+ model.setPubDate(getPubDate());
+ model.setLastBuildDate(getLastBuildDate());
+ model.setActive(getActive());
+
+ model = (RssChanel) Proxy.newProxyInstance(RssChanel.class.getClassLoader(),
+ new Class[] { RssChanel.class },
+ new ReadOnlyBeanHandler(model));
+
+ return model;
+ }
+ }
+
+ public ExpandoBridge getExpandoBridge() {
+ if (_expandoBridge == null) {
+ _expandoBridge = new ExpandoBridgeImpl(RssChanel.class.getName(),
+ getPrimaryKey());
+ }
+
+ return _expandoBridge;
+ }
+
+ public Object clone() {
+ RssChanelImpl clone = new RssChanelImpl();
+
+ clone.setChanelId(getChanelId());
+ clone.setUserId(getUserId());
+ clone.setUrl(getUrl());
+ clone.setTitle(getTitle());
+ clone.setDescription(getDescription());
+ clone.setLink(getLink());
+ clone.setUrlImage(getUrlImage());
+ clone.setPubDate(getPubDate());
+ clone.setLastBuildDate(getLastBuildDate());
+ clone.setActive(getActive());
+
+ return clone;
+ }
+
+ public int compareTo(RssChanel rssChanel) {
+ long pk = rssChanel.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;
+ }
+
+ RssChanel rssChanel = null;
+
+ try {
+ rssChanel = (RssChanel) obj;
+ } catch (ClassCastException cce) {
+ return false;
+ }
+
+ long pk = rssChanel.getPrimaryKey();
+
+ if (getPrimaryKey() == pk) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return (int) getPrimaryKey();
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("{chanelId=");
+ sb.append(getChanelId());
+ sb.append(", userId=");
+ sb.append(getUserId());
+ sb.append(", url=");
+ sb.append(getUrl());
+ sb.append(", title=");
+ sb.append(getTitle());
+ sb.append(", description=");
+ sb.append(getDescription());
+ sb.append(", link=");
+ sb.append(getLink());
+ sb.append(", urlImage=");
+ sb.append(getUrlImage());
+ sb.append(", pubDate=");
+ sb.append(getPubDate());
+ sb.append(", lastBuildDate=");
+ sb.append(getLastBuildDate());
+ sb.append(", active=");
+ sb.append(getActive());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("<model><model-name>");
+ sb.append("com.pentila.entSavoie.rss.model.RssChanel");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>chanelId</column-name><column-value><![CDATA[");
+ sb.append(getChanelId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>userId</column-name><column-value><![CDATA[");
+ sb.append(getUserId());
+ 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>title</column-name><column-value><![CDATA[");
+ sb.append(getTitle());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>description</column-name><column-value><![CDATA[");
+ sb.append(getDescription());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>link</column-name><column-value><![CDATA[");
+ sb.append(getLink());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>urlImage</column-name><column-value><![CDATA[");
+ sb.append(getUrlImage());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>pubDate</column-name><column-value><![CDATA[");
+ sb.append(getPubDate());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>lastBuildDate</column-name><column-value><![CDATA[");
+ sb.append(getLastBuildDate());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>active</column-name><column-value><![CDATA[");
+ sb.append(getActive());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+}