--- /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.userProperties.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.userProperties.model.DashboardDefaultConfig;
+import com.pentila.entSavoie.userProperties.model.DashboardDefaultConfigModel;
+
+import java.io.Serializable;
+
+import java.sql.Types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The base model implementation for the DashboardDefaultConfig service. Represents a row in the "userProperties_DashboardDefaultConfig" database table, with each column mapped to a property of this class.
+ *
+ * <p>
+ * This implementation and its corresponding interface {@link com.pentila.entSavoie.userProperties.model.DashboardDefaultConfigModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link DashboardDefaultConfigImpl}.
+ * </p>
+ *
+ * @author Amblard Mathieu - Barma Igor
+ * @see DashboardDefaultConfigImpl
+ * @see com.pentila.entSavoie.userProperties.model.DashboardDefaultConfig
+ * @see com.pentila.entSavoie.userProperties.model.DashboardDefaultConfigModel
+ * @generated
+ */
+public class DashboardDefaultConfigModelImpl extends BaseModelImpl<DashboardDefaultConfig>
+ implements DashboardDefaultConfigModel {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. All methods that expect a dashboard default config model instance should use the {@link com.pentila.entSavoie.userProperties.model.DashboardDefaultConfig} interface instead.
+ */
+ public static final String TABLE_NAME = "userProperties_DashboardDefaultConfig";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "roleId", Types.BIGINT },
+ { "configuration", Types.VARCHAR }
+ };
+ public static final String TABLE_SQL_CREATE = "create table userProperties_DashboardDefaultConfig (roleId LONG not null primary key,configuration STRING null)";
+ public static final String TABLE_SQL_DROP = "drop table userProperties_DashboardDefaultConfig";
+ 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.userProperties.model.DashboardDefaultConfig"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.userProperties.model.DashboardDefaultConfig"),
+ 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.userProperties.model.DashboardDefaultConfig"));
+
+ public DashboardDefaultConfigModelImpl() {
+ }
+
+ public long getPrimaryKey() {
+ return _roleId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setRoleId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_roleId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ public Class<?> getModelClass() {
+ return DashboardDefaultConfig.class;
+ }
+
+ public String getModelClassName() {
+ return DashboardDefaultConfig.class.getName();
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("roleId", getRoleId());
+ attributes.put("configuration", getConfiguration());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long roleId = (Long)attributes.get("roleId");
+
+ if (roleId != null) {
+ setRoleId(roleId);
+ }
+
+ String configuration = (String)attributes.get("configuration");
+
+ if (configuration != null) {
+ setConfiguration(configuration);
+ }
+ }
+
+ public long getRoleId() {
+ return _roleId;
+ }
+
+ public void setRoleId(long roleId) {
+ _roleId = roleId;
+ }
+
+ public String getConfiguration() {
+ if (_configuration == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _configuration;
+ }
+ }
+
+ public void setConfiguration(String configuration) {
+ _configuration = configuration;
+ }
+
+ @Override
+ public ExpandoBridge getExpandoBridge() {
+ return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
+ DashboardDefaultConfig.class.getName(), getPrimaryKey());
+ }
+
+ @Override
+ public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
+ ExpandoBridge expandoBridge = getExpandoBridge();
+
+ expandoBridge.setAttributes(serviceContext);
+ }
+
+ @Override
+ public DashboardDefaultConfig toEscapedModel() {
+ if (_escapedModelProxy == null) {
+ _escapedModelProxy = (DashboardDefaultConfig)ProxyUtil.newProxyInstance(_classLoader,
+ _escapedModelProxyInterfaces,
+ new AutoEscapeBeanHandler(this));
+ }
+
+ return _escapedModelProxy;
+ }
+
+ @Override
+ public Object clone() {
+ DashboardDefaultConfigImpl dashboardDefaultConfigImpl = new DashboardDefaultConfigImpl();
+
+ dashboardDefaultConfigImpl.setRoleId(getRoleId());
+ dashboardDefaultConfigImpl.setConfiguration(getConfiguration());
+
+ dashboardDefaultConfigImpl.resetOriginalValues();
+
+ return dashboardDefaultConfigImpl;
+ }
+
+ public int compareTo(DashboardDefaultConfig dashboardDefaultConfig) {
+ long primaryKey = dashboardDefaultConfig.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;
+ }
+
+ DashboardDefaultConfig dashboardDefaultConfig = null;
+
+ try {
+ dashboardDefaultConfig = (DashboardDefaultConfig)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = dashboardDefaultConfig.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public void resetOriginalValues() {
+ }
+
+ @Override
+ public CacheModel<DashboardDefaultConfig> toCacheModel() {
+ DashboardDefaultConfigCacheModel dashboardDefaultConfigCacheModel = new DashboardDefaultConfigCacheModel();
+
+ dashboardDefaultConfigCacheModel.roleId = getRoleId();
+
+ dashboardDefaultConfigCacheModel.configuration = getConfiguration();
+
+ String configuration = dashboardDefaultConfigCacheModel.configuration;
+
+ if ((configuration != null) && (configuration.length() == 0)) {
+ dashboardDefaultConfigCacheModel.configuration = null;
+ }
+
+ return dashboardDefaultConfigCacheModel;
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(5);
+
+ sb.append("{roleId=");
+ sb.append(getRoleId());
+ sb.append(", configuration=");
+ sb.append(getConfiguration());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(10);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.userProperties.model.DashboardDefaultConfig");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>roleId</column-name><column-value><![CDATA[");
+ sb.append(getRoleId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>configuration</column-name><column-value><![CDATA[");
+ sb.append(getConfiguration());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private static ClassLoader _classLoader = DashboardDefaultConfig.class.getClassLoader();
+ private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
+ DashboardDefaultConfig.class
+ };
+ private long _roleId;
+ private String _configuration;
+ private DashboardDefaultConfig _escapedModelProxy;
+}
\ No newline at end of file