--- /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.institutionalList.model.impl;
+
+import java.io.Serializable;
+import java.sql.Types;
+import java.util.HashMap;
+import java.util.Map;
+
+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.institutionalList.model.ListeInstDetails;
+import com.pentila.entSavoie.institutionalList.model.ListeInstDetailsModel;
+
+/**
+ * The base model implementation for the ListeInstDetails service. Represents a row in the "InstitutionalList_ListeInstDetails" database table, with each column mapped to a property of this class.
+ *
+ * <p>
+ * This implementation and its corresponding interface {@link com.pentila.entSavoie.institutionalList.model.ListeInstDetailsModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link ListeInstDetailsImpl}.
+ * </p>
+ *
+ * @author DIMIER Cedric
+ * @see ListeInstDetailsImpl
+ * @see com.pentila.entSavoie.institutionalList.model.ListeInstDetails
+ * @see com.pentila.entSavoie.institutionalList.model.ListeInstDetailsModel
+ * @generated
+ */
+public class ListeInstDetailsModelImpl extends BaseModelImpl<ListeInstDetails>
+ implements ListeInstDetailsModel {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. All methods that expect a liste inst details model instance should use the {@link com.pentila.entSavoie.institutionalList.model.ListeInstDetails} interface instead.
+ */
+ public static final String TABLE_NAME = "InstitutionalList_ListeInstDetails";
+ public static final Object[][] TABLE_COLUMNS = {
+ { "listeInstDetailsId", Types.BIGINT },
+ { "listeInstId", Types.BIGINT },
+ { "listeInstDetailsName", Types.VARCHAR },
+ { "orgId", Types.BIGINT },
+ { "roleId", Types.BIGINT },
+ { "subOrgId", Types.VARCHAR },
+ { "roleFilter", Types.VARCHAR },
+ { "parentList", Types.BOOLEAN },
+ { "childrenList", Types.BOOLEAN }
+ };
+ public static final String TABLE_SQL_CREATE = "create table InstitutionalList_ListeInstDetails (listeInstDetailsId LONG not null primary key,listeInstId LONG,listeInstDetailsName VARCHAR(75) null,orgId LONG,roleId LONG,subOrgId VARCHAR(75) null,roleFilter VARCHAR(75) null,parentList BOOLEAN,childrenList BOOLEAN)";
+ public static final String TABLE_SQL_DROP = "drop table InstitutionalList_ListeInstDetails";
+ 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.institutionalList.model.ListeInstDetails"),
+ true);
+ public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.finder.cache.enabled.com.pentila.entSavoie.institutionalList.model.ListeInstDetails"),
+ true);
+ public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
+ "value.object.column.bitmask.enabled.com.pentila.entSavoie.institutionalList.model.ListeInstDetails"),
+ true);
+ public static long CHILDRENLIST_COLUMN_BITMASK = 1L;
+ public static long LISTEINSTID_COLUMN_BITMASK = 2L;
+ public static long ORGID_COLUMN_BITMASK = 4L;
+ public static long PARENTLIST_COLUMN_BITMASK = 8L;
+ public static long ROLEFILTER_COLUMN_BITMASK = 16L;
+ public static long ROLEID_COLUMN_BITMASK = 32L;
+ public static long SUBORGID_COLUMN_BITMASK = 64L;
+ public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
+ "lock.expiration.time.com.pentila.entSavoie.institutionalList.model.ListeInstDetails"));
+
+ public ListeInstDetailsModelImpl() {
+ }
+
+ public long getPrimaryKey() {
+ return _listeInstDetailsId;
+ }
+
+ public void setPrimaryKey(long primaryKey) {
+ setListeInstDetailsId(primaryKey);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return new Long(_listeInstDetailsId);
+ }
+
+ public void setPrimaryKeyObj(Serializable primaryKeyObj) {
+ setPrimaryKey(((Long)primaryKeyObj).longValue());
+ }
+
+ public Class<?> getModelClass() {
+ return ListeInstDetails.class;
+ }
+
+ public String getModelClassName() {
+ return ListeInstDetails.class.getName();
+ }
+
+ @Override
+ public Map<String, Object> getModelAttributes() {
+ Map<String, Object> attributes = new HashMap<String, Object>();
+
+ attributes.put("listeInstDetailsId", getListeInstDetailsId());
+ attributes.put("listeInstId", getListeInstId());
+ attributes.put("listeInstDetailsName", getListeInstDetailsName());
+ attributes.put("orgId", getOrgId());
+ attributes.put("roleId", getRoleId());
+ attributes.put("subOrgId", getSubOrgId());
+ attributes.put("roleFilter", getRoleFilter());
+ attributes.put("parentList", getParentList());
+ attributes.put("childrenList", getChildrenList());
+
+ return attributes;
+ }
+
+ @Override
+ public void setModelAttributes(Map<String, Object> attributes) {
+ Long listeInstDetailsId = (Long)attributes.get("listeInstDetailsId");
+
+ if (listeInstDetailsId != null) {
+ setListeInstDetailsId(listeInstDetailsId);
+ }
+
+ Long listeInstId = (Long)attributes.get("listeInstId");
+
+ if (listeInstId != null) {
+ setListeInstId(listeInstId);
+ }
+
+ String listeInstDetailsName = (String)attributes.get(
+ "listeInstDetailsName");
+
+ if (listeInstDetailsName != null) {
+ setListeInstDetailsName(listeInstDetailsName);
+ }
+
+ Long orgId = (Long)attributes.get("orgId");
+
+ if (orgId != null) {
+ setOrgId(orgId);
+ }
+
+ Long roleId = (Long)attributes.get("roleId");
+
+ if (roleId != null) {
+ setRoleId(roleId);
+ }
+
+ String subOrgId = (String)attributes.get("subOrgId");
+
+ if (subOrgId != null) {
+ setSubOrgId(subOrgId);
+ }
+
+ String roleFilter = (String)attributes.get("roleFilter");
+
+ if (roleFilter != null) {
+ setRoleFilter(roleFilter);
+ }
+
+ Boolean parentList = (Boolean)attributes.get("parentList");
+
+ if (parentList != null) {
+ setParentList(parentList);
+ }
+
+ Boolean childrenList = (Boolean)attributes.get("childrenList");
+
+ if (childrenList != null) {
+ setChildrenList(childrenList);
+ }
+ }
+
+ public long getListeInstDetailsId() {
+ return _listeInstDetailsId;
+ }
+
+ public void setListeInstDetailsId(long listeInstDetailsId) {
+ _listeInstDetailsId = listeInstDetailsId;
+ }
+
+ public long getListeInstId() {
+ return _listeInstId;
+ }
+
+ public void setListeInstId(long listeInstId) {
+ _columnBitmask |= LISTEINSTID_COLUMN_BITMASK;
+
+ if (!_setOriginalListeInstId) {
+ _setOriginalListeInstId = true;
+
+ _originalListeInstId = _listeInstId;
+ }
+
+ _listeInstId = listeInstId;
+ }
+
+ public long getOriginalListeInstId() {
+ return _originalListeInstId;
+ }
+
+ public String getListeInstDetailsName() {
+ if (_listeInstDetailsName == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _listeInstDetailsName;
+ }
+ }
+
+ public void setListeInstDetailsName(String listeInstDetailsName) {
+ _listeInstDetailsName = listeInstDetailsName;
+ }
+
+ public long getOrgId() {
+ return _orgId;
+ }
+
+ public void setOrgId(long orgId) {
+ _columnBitmask |= ORGID_COLUMN_BITMASK;
+
+ if (!_setOriginalOrgId) {
+ _setOriginalOrgId = true;
+
+ _originalOrgId = _orgId;
+ }
+
+ _orgId = orgId;
+ }
+
+ public long getOriginalOrgId() {
+ return _originalOrgId;
+ }
+
+ public long getRoleId() {
+ return _roleId;
+ }
+
+ public void setRoleId(long roleId) {
+ _columnBitmask |= ROLEID_COLUMN_BITMASK;
+
+ if (!_setOriginalRoleId) {
+ _setOriginalRoleId = true;
+
+ _originalRoleId = _roleId;
+ }
+
+ _roleId = roleId;
+ }
+
+ public long getOriginalRoleId() {
+ return _originalRoleId;
+ }
+
+ public String getSubOrgId() {
+ if (_subOrgId == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _subOrgId;
+ }
+ }
+
+ public void setSubOrgId(String subOrgId) {
+ _columnBitmask |= SUBORGID_COLUMN_BITMASK;
+
+ if (_originalSubOrgId == null) {
+ _originalSubOrgId = _subOrgId;
+ }
+
+ _subOrgId = subOrgId;
+ }
+
+ public String getOriginalSubOrgId() {
+ return GetterUtil.getString(_originalSubOrgId);
+ }
+
+ public String getRoleFilter() {
+ if (_roleFilter == null) {
+ return StringPool.BLANK;
+ }
+ else {
+ return _roleFilter;
+ }
+ }
+
+ public void setRoleFilter(String roleFilter) {
+ _columnBitmask |= ROLEFILTER_COLUMN_BITMASK;
+
+ if (_originalRoleFilter == null) {
+ _originalRoleFilter = _roleFilter;
+ }
+
+ _roleFilter = roleFilter;
+ }
+
+ public String getOriginalRoleFilter() {
+ return GetterUtil.getString(_originalRoleFilter);
+ }
+
+ public boolean getParentList() {
+ return _parentList;
+ }
+
+ public boolean isParentList() {
+ return _parentList;
+ }
+
+ public void setParentList(boolean parentList) {
+ _columnBitmask |= PARENTLIST_COLUMN_BITMASK;
+
+ if (!_setOriginalParentList) {
+ _setOriginalParentList = true;
+
+ _originalParentList = _parentList;
+ }
+
+ _parentList = parentList;
+ }
+
+ public boolean getOriginalParentList() {
+ return _originalParentList;
+ }
+
+ public boolean getChildrenList() {
+ return _childrenList;
+ }
+
+ public boolean isChildrenList() {
+ return _childrenList;
+ }
+
+ public void setChildrenList(boolean childrenList) {
+ _columnBitmask |= CHILDRENLIST_COLUMN_BITMASK;
+
+ if (!_setOriginalChildrenList) {
+ _setOriginalChildrenList = true;
+
+ _originalChildrenList = _childrenList;
+ }
+
+ _childrenList = childrenList;
+ }
+
+ public boolean getOriginalChildrenList() {
+ return _originalChildrenList;
+ }
+
+ public long getColumnBitmask() {
+ return _columnBitmask;
+ }
+
+ @Override
+ public ExpandoBridge getExpandoBridge() {
+ return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
+ ListeInstDetails.class.getName(), getPrimaryKey());
+ }
+
+ @Override
+ public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
+ ExpandoBridge expandoBridge = getExpandoBridge();
+
+ expandoBridge.setAttributes(serviceContext);
+ }
+
+ @Override
+ public ListeInstDetails toEscapedModel() {
+ if (_escapedModelProxy == null) {
+ _escapedModelProxy = (ListeInstDetails)ProxyUtil.newProxyInstance(_classLoader,
+ _escapedModelProxyInterfaces,
+ new AutoEscapeBeanHandler(this));
+ }
+
+ return _escapedModelProxy;
+ }
+
+ @Override
+ public Object clone() {
+ ListeInstDetailsImpl listeInstDetailsImpl = new ListeInstDetailsImpl();
+
+ listeInstDetailsImpl.setListeInstDetailsId(getListeInstDetailsId());
+ listeInstDetailsImpl.setListeInstId(getListeInstId());
+ listeInstDetailsImpl.setListeInstDetailsName(getListeInstDetailsName());
+ listeInstDetailsImpl.setOrgId(getOrgId());
+ listeInstDetailsImpl.setRoleId(getRoleId());
+ listeInstDetailsImpl.setSubOrgId(getSubOrgId());
+ listeInstDetailsImpl.setRoleFilter(getRoleFilter());
+ listeInstDetailsImpl.setParentList(getParentList());
+ listeInstDetailsImpl.setChildrenList(getChildrenList());
+
+ listeInstDetailsImpl.resetOriginalValues();
+
+ return listeInstDetailsImpl;
+ }
+
+ public int compareTo(ListeInstDetails listeInstDetails) {
+ long primaryKey = listeInstDetails.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;
+ }
+
+ ListeInstDetails listeInstDetails = null;
+
+ try {
+ listeInstDetails = (ListeInstDetails)obj;
+ }
+ catch (ClassCastException cce) {
+ return false;
+ }
+
+ long primaryKey = listeInstDetails.getPrimaryKey();
+
+ if (getPrimaryKey() == primaryKey) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return (int)getPrimaryKey();
+ }
+
+ @Override
+ public void resetOriginalValues() {
+ ListeInstDetailsModelImpl listeInstDetailsModelImpl = this;
+
+ listeInstDetailsModelImpl._originalListeInstId = listeInstDetailsModelImpl._listeInstId;
+
+ listeInstDetailsModelImpl._setOriginalListeInstId = false;
+
+ listeInstDetailsModelImpl._originalOrgId = listeInstDetailsModelImpl._orgId;
+
+ listeInstDetailsModelImpl._setOriginalOrgId = false;
+
+ listeInstDetailsModelImpl._originalRoleId = listeInstDetailsModelImpl._roleId;
+
+ listeInstDetailsModelImpl._setOriginalRoleId = false;
+
+ listeInstDetailsModelImpl._originalSubOrgId = listeInstDetailsModelImpl._subOrgId;
+
+ listeInstDetailsModelImpl._originalRoleFilter = listeInstDetailsModelImpl._roleFilter;
+
+ listeInstDetailsModelImpl._originalParentList = listeInstDetailsModelImpl._parentList;
+
+ listeInstDetailsModelImpl._setOriginalParentList = false;
+
+ listeInstDetailsModelImpl._originalChildrenList = listeInstDetailsModelImpl._childrenList;
+
+ listeInstDetailsModelImpl._setOriginalChildrenList = false;
+
+ listeInstDetailsModelImpl._columnBitmask = 0;
+ }
+
+ @Override
+ public CacheModel<ListeInstDetails> toCacheModel() {
+ ListeInstDetailsCacheModel listeInstDetailsCacheModel = new ListeInstDetailsCacheModel();
+
+ listeInstDetailsCacheModel.listeInstDetailsId = getListeInstDetailsId();
+
+ listeInstDetailsCacheModel.listeInstId = getListeInstId();
+
+ listeInstDetailsCacheModel.listeInstDetailsName = getListeInstDetailsName();
+
+ String listeInstDetailsName = listeInstDetailsCacheModel.listeInstDetailsName;
+
+ if ((listeInstDetailsName != null) &&
+ (listeInstDetailsName.length() == 0)) {
+ listeInstDetailsCacheModel.listeInstDetailsName = null;
+ }
+
+ listeInstDetailsCacheModel.orgId = getOrgId();
+
+ listeInstDetailsCacheModel.roleId = getRoleId();
+
+ listeInstDetailsCacheModel.subOrgId = getSubOrgId();
+
+ String subOrgId = listeInstDetailsCacheModel.subOrgId;
+
+ if ((subOrgId != null) && (subOrgId.length() == 0)) {
+ listeInstDetailsCacheModel.subOrgId = null;
+ }
+
+ listeInstDetailsCacheModel.roleFilter = getRoleFilter();
+
+ String roleFilter = listeInstDetailsCacheModel.roleFilter;
+
+ if ((roleFilter != null) && (roleFilter.length() == 0)) {
+ listeInstDetailsCacheModel.roleFilter = null;
+ }
+
+ listeInstDetailsCacheModel.parentList = getParentList();
+
+ listeInstDetailsCacheModel.childrenList = getChildrenList();
+
+ return listeInstDetailsCacheModel;
+ }
+
+ @Override
+ public String toString() {
+ StringBundler sb = new StringBundler(19);
+
+ sb.append("{listeInstDetailsId=");
+ sb.append(getListeInstDetailsId());
+ sb.append(", listeInstId=");
+ sb.append(getListeInstId());
+ sb.append(", listeInstDetailsName=");
+ sb.append(getListeInstDetailsName());
+ sb.append(", orgId=");
+ sb.append(getOrgId());
+ sb.append(", roleId=");
+ sb.append(getRoleId());
+ sb.append(", subOrgId=");
+ sb.append(getSubOrgId());
+ sb.append(", roleFilter=");
+ sb.append(getRoleFilter());
+ sb.append(", parentList=");
+ sb.append(getParentList());
+ sb.append(", childrenList=");
+ sb.append(getChildrenList());
+ sb.append("}");
+
+ return sb.toString();
+ }
+
+ public String toXmlString() {
+ StringBundler sb = new StringBundler(31);
+
+ sb.append("<model><model-name>");
+ sb.append(
+ "com.pentila.entSavoie.institutionalList.model.ListeInstDetails");
+ sb.append("</model-name>");
+
+ sb.append(
+ "<column><column-name>listeInstDetailsId</column-name><column-value><![CDATA[");
+ sb.append(getListeInstDetailsId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>listeInstId</column-name><column-value><![CDATA[");
+ sb.append(getListeInstId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>listeInstDetailsName</column-name><column-value><![CDATA[");
+ sb.append(getListeInstDetailsName());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>orgId</column-name><column-value><![CDATA[");
+ sb.append(getOrgId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>roleId</column-name><column-value><![CDATA[");
+ sb.append(getRoleId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>subOrgId</column-name><column-value><![CDATA[");
+ sb.append(getSubOrgId());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>roleFilter</column-name><column-value><![CDATA[");
+ sb.append(getRoleFilter());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>parentList</column-name><column-value><![CDATA[");
+ sb.append(getParentList());
+ sb.append("]]></column-value></column>");
+ sb.append(
+ "<column><column-name>childrenList</column-name><column-value><![CDATA[");
+ sb.append(getChildrenList());
+ sb.append("]]></column-value></column>");
+
+ sb.append("</model>");
+
+ return sb.toString();
+ }
+
+ private static ClassLoader _classLoader = ListeInstDetails.class.getClassLoader();
+ private static Class<?>[] _escapedModelProxyInterfaces = new Class[] {
+ ListeInstDetails.class
+ };
+ private long _listeInstDetailsId;
+ private long _listeInstId;
+ private long _originalListeInstId;
+ private boolean _setOriginalListeInstId;
+ private String _listeInstDetailsName;
+ private long _orgId;
+ private long _originalOrgId;
+ private boolean _setOriginalOrgId;
+ private long _roleId;
+ private long _originalRoleId;
+ private boolean _setOriginalRoleId;
+ private String _subOrgId;
+ private String _originalSubOrgId;
+ private String _roleFilter;
+ private String _originalRoleFilter;
+ private boolean _parentList;
+ private boolean _originalParentList;
+ private boolean _setOriginalParentList;
+ private boolean _childrenList;
+ private boolean _originalChildrenList;
+ private boolean _setOriginalChildrenList;
+ private long _columnBitmask;
+ private ListeInstDetails _escapedModelProxy;
+}
\ No newline at end of file