--- /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.updateInformation.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.kernel.util.StringPool;
+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.updateInformation.model.UpdateInformation;
+import com.pentila.entSavoie.updateInformation.model.UpdateInformationModel;
+
+import java.io.Serializable;
+
+import java.sql.Types;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The base model implementation for the UpdateInformation service. Represents a row in the "UpdateInformation_UpdateInformation" database table, with each column mapped to a property of this class.
+ *
+ * <p>
+ * This implementation and its corresponding interface {@link com.pentila.entSavoie.updateInformation.model.UpdateInformationModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link UpdateInformationImpl}.
+ * </p>
+ *
+ * @author Emma Osborn
+ * @see UpdateInformationImpl
+ * @see com.pentila.entSavoie.updateInformation.model.UpdateInformation
+ * @see com.pentila.entSavoie.updateInformation.model.UpdateInformationModel
+ * @generated
+ */
+public class UpdateInformationModelImpl extends BaseModelImpl<UpdateInformation>
+ implements UpdateInformationModel {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. All methods that expect a update information model instance should use the {@link com.pentila.entSavoie.updateInformation.model.UpdateInformation} interface instead.
+ */
+ public static final String TABLE_NAME = "UpdateInformation_UpdateInformation";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "updateInfoId", Types.BIGINT },
+ { "description", Types.VARCHAR },
+ { "modifyDate", Types.TIMESTAMP }
+ };
+ public static final String TABLE_SQL_CREATE = "create table UpdateInformation_UpdateInformation (updateInfoId LONG not null primary key,description VARCHAR(75) null,modifyDate DATE null)";
+ public static final String TABLE_SQL_DROP = "drop table UpdateInformation_UpdateInformation";
+ 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.updateInformation.model.UpdateInformation"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.updateInformation.model.UpdateInformation"),
+ true);
+ public static final boolean COLUMN_BITMASK_ENABLED = false;
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
+ "lock.expiration.time.com.pentila.entSavoie.updateInformation.model.UpdateInformation"));
+
+ public UpdateInformationModelImpl() {
+ }
+
+ public long getPrimaryKey() {
+ return _updateInfoId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setUpdateInfoId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_updateInfoId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ public Class<?> getModelClass() {
+ return UpdateInformation.class;
+ }
+
+ public String getModelClassName() {
+ return UpdateInformation.class.getName();
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("updateInfoId", getUpdateInfoId());
+ attributes.put("description", getDescription());
+ attributes.put("modifyDate", getModifyDate());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long updateInfoId = (Long)attributes.get("updateInfoId");
+
+ if (updateInfoId != null) {
+ setUpdateInfoId(updateInfoId);
+ }
+
+ String description = (String)attributes.get("description");
+
+ if (description != null) {
+ setDescription(description);
+ }
+
+ Date modifyDate = (Date)attributes.get("modifyDate");
+
+ if (modifyDate != null) {
+ setModifyDate(modifyDate);
+ }
+ }
+
+ public long getUpdateInfoId() {
+ return _updateInfoId;
+ }
+
+ public void setUpdateInfoId(long updateInfoId) {
+ _updateInfoId = updateInfoId;
+ }
+
+ public String getDescription() {
+ if (_description == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _description;
+ }
+ }
+
+ public void setDescription(String description) {
+ _description = description;
+ }
+
+ public Date getModifyDate() {
+ return _modifyDate;
+ }
+
+ public void setModifyDate(Date modifyDate) {
+ _modifyDate = modifyDate;
+ }
+
+ @Override
+ public ExpandoBridge getExpandoBridge() {
+ return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
+ UpdateInformation.class.getName(), getPrimaryKey());
+ }
+
+ @Override
+ public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
+ ExpandoBridge expandoBridge = getExpandoBridge();
+
+ expandoBridge.setAttributes(serviceContext);
+ }
+
+ @Override
+ public UpdateInformation toEscapedModel() {
+ if (_escapedModelProxy == null) {
+ _escapedModelProxy = (UpdateInformation)ProxyUtil.newProxyInstance(_classLoader,
+ _escapedModelProxyInterfaces,
+ new AutoEscapeBeanHandler(this));
+ }
+
+ return _escapedModelProxy;
+ }
+
+ @Override
+ public Object clone() {
+ UpdateInformationImpl updateInformationImpl = new UpdateInformationImpl();
+
+ updateInformationImpl.setUpdateInfoId(getUpdateInfoId());
+ updateInformationImpl.setDescription(getDescription());
+ updateInformationImpl.setModifyDate(getModifyDate());
+
+ updateInformationImpl.resetOriginalValues();
+
+ return updateInformationImpl;
+ }
+
+ public int compareTo(UpdateInformation updateInformation) {
+ long primaryKey = updateInformation.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;
+ }
+
+ UpdateInformation updateInformation = null;
+
+ try {
+ updateInformation = (UpdateInformation)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = updateInformation.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public void resetOriginalValues() {
+ }
+
+ @Override
+ public CacheModel<UpdateInformation> toCacheModel() {
+ UpdateInformationCacheModel updateInformationCacheModel = new UpdateInformationCacheModel();
+
+ updateInformationCacheModel.updateInfoId = getUpdateInfoId();
+
+ updateInformationCacheModel.description = getDescription();
+
+ String description = updateInformationCacheModel.description;
+
+ if ((description != null) && (description.length() == 0)) {
+ updateInformationCacheModel.description = null;
+ }
+
+ Date modifyDate = getModifyDate();
+
+ if (modifyDate != null) {
+ updateInformationCacheModel.modifyDate = modifyDate.getTime();
+ }
+ else {
+ updateInformationCacheModel.modifyDate = Long.MIN_VALUE;
+ }
+
+ return updateInformationCacheModel;
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(7);
+
+ sb.append("{updateInfoId=");
+ sb.append(getUpdateInfoId());
+ sb.append(", description=");
+ sb.append(getDescription());
+ sb.append(", modifyDate=");
+ sb.append(getModifyDate());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(13);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.updateInformation.model.UpdateInformation");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>updateInfoId</column-name><column-value><![CDATA[");
+ sb.append(getUpdateInfoId());
+ 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>modifyDate</column-name><column-value><![CDATA[");
+ sb.append(getModifyDate());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private static ClassLoader _classLoader = UpdateInformation.class.getClassLoader();
+ private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
+ UpdateInformation.class
+ };
+ private long _updateInfoId;
+ private String _description;
+ private Date _modifyDate;
+ private UpdateInformation _escapedModelProxy;
+}
\ No newline at end of file