--- /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.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.gestionVieScolaire.model.SynchroConfig;
+import com.pentila.entSavoie.gestionVieScolaire.model.SynchroConfigModel;
+
+import java.io.Serializable;
+
+import java.sql.Types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The base model implementation for the SynchroConfig service. Represents a row in the "GestionVieScolaire_SynchroConfig" 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.SynchroConfigModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link SynchroConfigImpl}.
+ * </p>
+ *
+ * @author Cédric Lecarpentier
+ * @see SynchroConfigImpl
+ * @see com.pentila.entSavoie.gestionVieScolaire.model.SynchroConfig
+ * @see com.pentila.entSavoie.gestionVieScolaire.model.SynchroConfigModel
+ * @generated
+ */
+public class SynchroConfigModelImpl extends BaseModelImpl<SynchroConfig>
+ implements SynchroConfigModel {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. All methods that expect a synchro config model instance should use the {@link com.pentila.entSavoie.gestionVieScolaire.model.SynchroConfig} interface instead.
+ */
+ public static final String TABLE_NAME = "GestionVieScolaire_SynchroConfig";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "etabId", Types.BIGINT },
+ { "etabName", Types.VARCHAR },
+ { "dataSource", Types.VARCHAR },
+ { "configDone", Types.BOOLEAN },
+ { "syncMembership", Types.BOOLEAN },
+ { "syncCDT", Types.BOOLEAN },
+ { "syncAgenda", Types.BOOLEAN }
+ };
+ public static final String TABLE_SQL_CREATE = "create table GestionVieScolaire_SynchroConfig (etabId LONG not null primary key,etabName VARCHAR(75) null,dataSource VARCHAR(75) null,configDone BOOLEAN,syncMembership BOOLEAN,syncCDT BOOLEAN,syncAgenda BOOLEAN)";
+ public static final String TABLE_SQL_DROP = "drop table GestionVieScolaire_SynchroConfig";
+ 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.SynchroConfig"),
+ 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.SynchroConfig"),
+ 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.gestionVieScolaire.model.SynchroConfig"));
+
+ public SynchroConfigModelImpl() {
+ }
+
+ public long getPrimaryKey() {
+ return _etabId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setEtabId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_etabId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ public Class<?> getModelClass() {
+ return SynchroConfig.class;
+ }
+
+ public String getModelClassName() {
+ return SynchroConfig.class.getName();
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("etabId", getEtabId());
+ attributes.put("etabName", getEtabName());
+ attributes.put("dataSource", getDataSource());
+ attributes.put("configDone", getConfigDone());
+ attributes.put("syncMembership", getSyncMembership());
+ attributes.put("syncCDT", getSyncCDT());
+ attributes.put("syncAgenda", getSyncAgenda());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long etabId = (Long)attributes.get("etabId");
+
+ if (etabId != null) {
+ setEtabId(etabId);
+ }
+
+ String etabName = (String)attributes.get("etabName");
+
+ if (etabName != null) {
+ setEtabName(etabName);
+ }
+
+ String dataSource = (String)attributes.get("dataSource");
+
+ if (dataSource != null) {
+ setDataSource(dataSource);
+ }
+
+ Boolean configDone = (Boolean)attributes.get("configDone");
+
+ if (configDone != null) {
+ setConfigDone(configDone);
+ }
+
+ Boolean syncMembership = (Boolean)attributes.get("syncMembership");
+
+ if (syncMembership != null) {
+ setSyncMembership(syncMembership);
+ }
+
+ Boolean syncCDT = (Boolean)attributes.get("syncCDT");
+
+ if (syncCDT != null) {
+ setSyncCDT(syncCDT);
+ }
+
+ Boolean syncAgenda = (Boolean)attributes.get("syncAgenda");
+
+ if (syncAgenda != null) {
+ setSyncAgenda(syncAgenda);
+ }
+ }
+
+ public long getEtabId() {
+ return _etabId;
+ }
+
+ public void setEtabId(long etabId) {
+ _etabId = etabId;
+ }
+
+ public String getEtabName() {
+ if (_etabName == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _etabName;
+ }
+ }
+
+ public void setEtabName(String etabName) {
+ _etabName = etabName;
+ }
+
+ public String getDataSource() {
+ if (_dataSource == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _dataSource;
+ }
+ }
+
+ public void setDataSource(String dataSource) {
+ _dataSource = dataSource;
+ }
+
+ public boolean getConfigDone() {
+ return _configDone;
+ }
+
+ public boolean isConfigDone() {
+ return _configDone;
+ }
+
+ public void setConfigDone(boolean configDone) {
+ _configDone = configDone;
+ }
+
+ public boolean getSyncMembership() {
+ return _syncMembership;
+ }
+
+ public boolean isSyncMembership() {
+ return _syncMembership;
+ }
+
+ public void setSyncMembership(boolean syncMembership) {
+ _syncMembership = syncMembership;
+ }
+
+ public boolean getSyncCDT() {
+ return _syncCDT;
+ }
+
+ public boolean isSyncCDT() {
+ return _syncCDT;
+ }
+
+ public void setSyncCDT(boolean syncCDT) {
+ _syncCDT = syncCDT;
+ }
+
+ public boolean getSyncAgenda() {
+ return _syncAgenda;
+ }
+
+ public boolean isSyncAgenda() {
+ return _syncAgenda;
+ }
+
+ public void setSyncAgenda(boolean syncAgenda) {
+ _syncAgenda = syncAgenda;
+ }
+
+ @Override
+ public ExpandoBridge getExpandoBridge() {
+ return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
+ SynchroConfig.class.getName(), getPrimaryKey());
+ }
+
+ @Override
+ public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
+ ExpandoBridge expandoBridge = getExpandoBridge();
+
+ expandoBridge.setAttributes(serviceContext);
+ }
+
+ @Override
+ public SynchroConfig toEscapedModel() {
+ if (_escapedModelProxy == null) {
+ _escapedModelProxy = (SynchroConfig)ProxyUtil.newProxyInstance(_classLoader,
+ _escapedModelProxyInterfaces,
+ new AutoEscapeBeanHandler(this));
+ }
+
+ return _escapedModelProxy;
+ }
+
+ @Override
+ public Object clone() {
+ SynchroConfigImpl synchroConfigImpl = new SynchroConfigImpl();
+
+ synchroConfigImpl.setEtabId(getEtabId());
+ synchroConfigImpl.setEtabName(getEtabName());
+ synchroConfigImpl.setDataSource(getDataSource());
+ synchroConfigImpl.setConfigDone(getConfigDone());
+ synchroConfigImpl.setSyncMembership(getSyncMembership());
+ synchroConfigImpl.setSyncCDT(getSyncCDT());
+ synchroConfigImpl.setSyncAgenda(getSyncAgenda());
+
+ synchroConfigImpl.resetOriginalValues();
+
+ return synchroConfigImpl;
+ }
+
+ public int compareTo(SynchroConfig synchroConfig) {
+ long primaryKey = synchroConfig.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;
+ }
+
+ SynchroConfig synchroConfig = null;
+
+ try {
+ synchroConfig = (SynchroConfig)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = synchroConfig.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public void resetOriginalValues() {
+ }
+
+ @Override
+ public CacheModel<SynchroConfig> toCacheModel() {
+ SynchroConfigCacheModel synchroConfigCacheModel = new SynchroConfigCacheModel();
+
+ synchroConfigCacheModel.etabId = getEtabId();
+
+ synchroConfigCacheModel.etabName = getEtabName();
+
+ String etabName = synchroConfigCacheModel.etabName;
+
+ if ((etabName != null) && (etabName.length() == 0)) {
+ synchroConfigCacheModel.etabName = null;
+ }
+
+ synchroConfigCacheModel.dataSource = getDataSource();
+
+ String dataSource = synchroConfigCacheModel.dataSource;
+
+ if ((dataSource != null) && (dataSource.length() == 0)) {
+ synchroConfigCacheModel.dataSource = null;
+ }
+
+ synchroConfigCacheModel.configDone = getConfigDone();
+
+ synchroConfigCacheModel.syncMembership = getSyncMembership();
+
+ synchroConfigCacheModel.syncCDT = getSyncCDT();
+
+ synchroConfigCacheModel.syncAgenda = getSyncAgenda();
+
+ return synchroConfigCacheModel;
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(15);
+
+ sb.append("{etabId=");
+ sb.append(getEtabId());
+ sb.append(", etabName=");
+ sb.append(getEtabName());
+ sb.append(", dataSource=");
+ sb.append(getDataSource());
+ sb.append(", configDone=");
+ sb.append(getConfigDone());
+ sb.append(", syncMembership=");
+ sb.append(getSyncMembership());
+ sb.append(", syncCDT=");
+ sb.append(getSyncCDT());
+ sb.append(", syncAgenda=");
+ sb.append(getSyncAgenda());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(25);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.gestionVieScolaire.model.SynchroConfig");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>etabId</column-name><column-value><![CDATA[");
+ sb.append(getEtabId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>etabName</column-name><column-value><![CDATA[");
+ sb.append(getEtabName());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>dataSource</column-name><column-value><![CDATA[");
+ sb.append(getDataSource());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>configDone</column-name><column-value><![CDATA[");
+ sb.append(getConfigDone());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>syncMembership</column-name><column-value><![CDATA[");
+ sb.append(getSyncMembership());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>syncCDT</column-name><column-value><![CDATA[");
+ sb.append(getSyncCDT());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>syncAgenda</column-name><column-value><![CDATA[");
+ sb.append(getSyncAgenda());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private static ClassLoader _classLoader = SynchroConfig.class.getClassLoader();
+ private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
+ SynchroConfig.class
+ };
+ private long _etabId;
+ private String _etabName;
+ private String _dataSource;
+ private boolean _configDone;
+ private boolean _syncMembership;
+ private boolean _syncCDT;
+ private boolean _syncAgenda;
+ private SynchroConfig _escapedModelProxy;
+}
\ No newline at end of file