--- /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.gestionVieScolaire.model.impl;
+
+import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
+import com.liferay.portal.kernel.util.GetterUtil;
+import com.liferay.portal.kernel.util.ProxyUtil;
+import com.liferay.portal.kernel.util.StringBundler;
+import com.liferay.portal.model.CacheModel;
+import com.liferay.portal.model.impl.BaseModelImpl;
+import com.liferay.portal.service.ServiceContext;
+
+import com.liferay.portlet.expando.model.ExpandoBridge;
+import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
+
+import com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping;
+import com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMappingModel;
+
+import java.io.Serializable;
+
+import java.sql.Types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The base model implementation for the AbsencesBlogEntryMapping service. Represents a row in the "GestionVieScolaire_AbsencesBlogEntryMapping" database table, with each column mapped to a property of this class.
+ *
+ * <p>
+ * This implementation and its corresponding interface {@link com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMappingModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link AbsencesBlogEntryMappingImpl}.
+ * </p>
+ *
+ * @author Cédric Lecarpentier
+ * @see AbsencesBlogEntryMappingImpl
+ * @see com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping
+ * @see com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMappingModel
+ * @generated
+ */
+public class AbsencesBlogEntryMappingModelImpl extends BaseModelImpl<AbsencesBlogEntryMapping>
+ implements AbsencesBlogEntryMappingModel {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. All methods that expect a absences blog entry mapping model instance should use the {@link com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping} interface instead.
+ */
+ public static final String TABLE_NAME = "GestionVieScolaire_AbsencesBlogEntryMapping";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "absencesBlogEntryMappingId", Types.BIGINT },
+ { "absenceId", Types.BIGINT },
+ { "blogEntryInfosId", Types.BIGINT }
+ };
+ public static final String TABLE_SQL_CREATE = "create table GestionVieScolaire_AbsencesBlogEntryMapping (absencesBlogEntryMappingId LONG not null primary key,absenceId LONG,blogEntryInfosId LONG)";
+ public static final String TABLE_SQL_DROP = "drop table GestionVieScolaire_AbsencesBlogEntryMapping";
+ 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.util.service.ServiceProps.get(
+ "value.object.entity.cache.enabled.com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping"),
+ true);
+ public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.column.bitmask.enabled.com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping"),
+ true);
+ public static long ABSENCEID_COLUMN_BITMASK = 1L;
+ public static long BLOGENTRYINFOSID_COLUMN_BITMASK = 2L;
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
+ "lock.expiration.time.com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping"));
+
+ public AbsencesBlogEntryMappingModelImpl() {
+ }
+
+ public long getPrimaryKey() {
+ return _absencesBlogEntryMappingId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setAbsencesBlogEntryMappingId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_absencesBlogEntryMappingId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ public Class<?> getModelClass() {
+ return AbsencesBlogEntryMapping.class;
+ }
+
+ public String getModelClassName() {
+ return AbsencesBlogEntryMapping.class.getName();
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("absencesBlogEntryMappingId",
+ getAbsencesBlogEntryMappingId());
+ attributes.put("absenceId", getAbsenceId());
+ attributes.put("blogEntryInfosId", getBlogEntryInfosId());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long absencesBlogEntryMappingId = (Long)attributes.get(
+ "absencesBlogEntryMappingId");
+
+ if (absencesBlogEntryMappingId != null) {
+ setAbsencesBlogEntryMappingId(absencesBlogEntryMappingId);
+ }
+
+ Long absenceId = (Long)attributes.get("absenceId");
+
+ if (absenceId != null) {
+ setAbsenceId(absenceId);
+ }
+
+ Long blogEntryInfosId = (Long)attributes.get("blogEntryInfosId");
+
+ if (blogEntryInfosId != null) {
+ setBlogEntryInfosId(blogEntryInfosId);
+ }
+ }
+
+ public long getAbsencesBlogEntryMappingId() {
+ return _absencesBlogEntryMappingId;
+ }
+
+ public void setAbsencesBlogEntryMappingId(long absencesBlogEntryMappingId) {
+ _absencesBlogEntryMappingId = absencesBlogEntryMappingId;
+ }
+
+ public long getAbsenceId() {
+ return _absenceId;
+ }
+
+ public void setAbsenceId(long absenceId) {
+ _columnBitmask |= ABSENCEID_COLUMN_BITMASK;
+
+ if (!_setOriginalAbsenceId) {
+ _setOriginalAbsenceId = true;
+
+ _originalAbsenceId = _absenceId;
+ }
+
+ _absenceId = absenceId;
+ }
+
+ public long getOriginalAbsenceId() {
+ return _originalAbsenceId;
+ }
+
+ public long getBlogEntryInfosId() {
+ return _blogEntryInfosId;
+ }
+
+ public void setBlogEntryInfosId(long blogEntryInfosId) {
+ _columnBitmask |= BLOGENTRYINFOSID_COLUMN_BITMASK;
+
+ if (!_setOriginalBlogEntryInfosId) {
+ _setOriginalBlogEntryInfosId = true;
+
+ _originalBlogEntryInfosId = _blogEntryInfosId;
+ }
+
+ _blogEntryInfosId = blogEntryInfosId;
+ }
+
+ public long getOriginalBlogEntryInfosId() {
+ return _originalBlogEntryInfosId;
+ }
+
+ public long getColumnBitmask() {
+ return _columnBitmask;
+ }
+
+ @Override
+ public ExpandoBridge getExpandoBridge() {
+ return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
+ AbsencesBlogEntryMapping.class.getName(), getPrimaryKey());
+ }
+
+ @Override
+ public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
+ ExpandoBridge expandoBridge = getExpandoBridge();
+
+ expandoBridge.setAttributes(serviceContext);
+ }
+
+ @Override
+ public AbsencesBlogEntryMapping toEscapedModel() {
+ if (_escapedModelProxy == null) {
+ _escapedModelProxy = (AbsencesBlogEntryMapping)ProxyUtil.newProxyInstance(_classLoader,
+ _escapedModelProxyInterfaces,
+ new AutoEscapeBeanHandler(this));
+ }
+
+ return _escapedModelProxy;
+ }
+
+ @Override
+ public Object clone() {
+ AbsencesBlogEntryMappingImpl absencesBlogEntryMappingImpl = new AbsencesBlogEntryMappingImpl();
+
+ absencesBlogEntryMappingImpl.setAbsencesBlogEntryMappingId(getAbsencesBlogEntryMappingId());
+ absencesBlogEntryMappingImpl.setAbsenceId(getAbsenceId());
+ absencesBlogEntryMappingImpl.setBlogEntryInfosId(getBlogEntryInfosId());
+
+ absencesBlogEntryMappingImpl.resetOriginalValues();
+
+ return absencesBlogEntryMappingImpl;
+ }
+
+ public int compareTo(AbsencesBlogEntryMapping absencesBlogEntryMapping) {
+ long primaryKey = absencesBlogEntryMapping.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;
+ }
+
+ AbsencesBlogEntryMapping absencesBlogEntryMapping = null;
+
+ try {
+ absencesBlogEntryMapping = (AbsencesBlogEntryMapping)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = absencesBlogEntryMapping.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public void resetOriginalValues() {
+ AbsencesBlogEntryMappingModelImpl absencesBlogEntryMappingModelImpl = this;
+
+ absencesBlogEntryMappingModelImpl._originalAbsenceId = absencesBlogEntryMappingModelImpl._absenceId;
+
+ absencesBlogEntryMappingModelImpl._setOriginalAbsenceId = false;
+
+ absencesBlogEntryMappingModelImpl._originalBlogEntryInfosId = absencesBlogEntryMappingModelImpl._blogEntryInfosId;
+
+ absencesBlogEntryMappingModelImpl._setOriginalBlogEntryInfosId = false;
+
+ absencesBlogEntryMappingModelImpl._columnBitmask = 0;
+ }
+
+ @Override
+ public CacheModel<AbsencesBlogEntryMapping> toCacheModel() {
+ AbsencesBlogEntryMappingCacheModel absencesBlogEntryMappingCacheModel = new AbsencesBlogEntryMappingCacheModel();
+
+ absencesBlogEntryMappingCacheModel.absencesBlogEntryMappingId = getAbsencesBlogEntryMappingId();
+
+ absencesBlogEntryMappingCacheModel.absenceId = getAbsenceId();
+
+ absencesBlogEntryMappingCacheModel.blogEntryInfosId = getBlogEntryInfosId();
+
+ return absencesBlogEntryMappingCacheModel;
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(7);
+
+ sb.append("{absencesBlogEntryMappingId=");
+ sb.append(getAbsencesBlogEntryMappingId());
+ sb.append(", absenceId=");
+ sb.append(getAbsenceId());
+ sb.append(", blogEntryInfosId=");
+ sb.append(getBlogEntryInfosId());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(13);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.gestionVieScolaire.model.AbsencesBlogEntryMapping");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>absencesBlogEntryMappingId</column-name><column-value><![CDATA[");
+ sb.append(getAbsencesBlogEntryMappingId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>absenceId</column-name><column-value><![CDATA[");
+ sb.append(getAbsenceId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>blogEntryInfosId</column-name><column-value><![CDATA[");
+ sb.append(getBlogEntryInfosId());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private static ClassLoader _classLoader = AbsencesBlogEntryMapping.class.getClassLoader();
+ private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
+ AbsencesBlogEntryMapping.class
+ };
+ private long _absencesBlogEntryMappingId;
+ private long _absenceId;
+ private long _originalAbsenceId;
+ private boolean _setOriginalAbsenceId;
+ private long _blogEntryInfosId;
+ private long _originalBlogEntryInfosId;
+ private boolean _setOriginalBlogEntryInfosId;
+ private long _columnBitmask;
+ private AbsencesBlogEntryMapping _escapedModelProxy;
+}
\ No newline at end of file