--- /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.service.persistence;
+
+import com.liferay.portal.NoSuchModelException;
+import com.liferay.portal.kernel.bean.BeanReference;
+import com.liferay.portal.kernel.cache.CacheRegistryUtil;
+import com.liferay.portal.kernel.dao.orm.EntityCacheUtil;
+import com.liferay.portal.kernel.dao.orm.FinderCacheUtil;
+import com.liferay.portal.kernel.dao.orm.FinderPath;
+import com.liferay.portal.kernel.dao.orm.Query;
+import com.liferay.portal.kernel.dao.orm.QueryUtil;
+import com.liferay.portal.kernel.dao.orm.Session;
+import com.liferay.portal.kernel.exception.SystemException;
+import com.liferay.portal.kernel.log.Log;
+import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.portlet.PortletClassLoaderUtil;
+import com.liferay.portal.kernel.util.GetterUtil;
+import com.liferay.portal.kernel.util.InstanceFactory;
+import com.liferay.portal.kernel.util.OrderByComparator;
+import com.liferay.portal.kernel.util.PropsKeys;
+import com.liferay.portal.kernel.util.PropsUtil;
+import com.liferay.portal.kernel.util.StringBundler;
+import com.liferay.portal.kernel.util.StringUtil;
+import com.liferay.portal.model.CacheModel;
+import com.liferay.portal.model.ModelListener;
+import com.liferay.portal.service.persistence.BatchSessionUtil;
+import com.liferay.portal.service.persistence.ResourcePersistence;
+import com.liferay.portal.service.persistence.UserPersistence;
+import com.liferay.portal.service.persistence.impl.BasePersistenceImpl;
+
+import com.pentila.entSavoie.userProperties.NoSuchUserMailSynchronisationException;
+import com.pentila.entSavoie.userProperties.model.UserMailSynchronisation;
+import com.pentila.entSavoie.userProperties.model.impl.UserMailSynchronisationImpl;
+import com.pentila.entSavoie.userProperties.model.impl.UserMailSynchronisationModelImpl;
+
+import java.io.Serializable;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * The persistence implementation for the user mail synchronisation service.
+ *
+ * <p>
+ * Caching information and settings can be found in <code>portal.properties</code>
+ * </p>
+ *
+ * @author Amblard Mathieu - Barma Igor
+ * @see UserMailSynchronisationPersistence
+ * @see UserMailSynchronisationUtil
+ * @generated
+ */
+public class UserMailSynchronisationPersistenceImpl extends BasePersistenceImpl<UserMailSynchronisation>
+ implements UserMailSynchronisationPersistence {
+ /*
+ * NOTE FOR DEVELOPERS:
+ *
+ * Never modify or reference this class directly. Always use {@link UserMailSynchronisationUtil} to access the user mail synchronisation persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this class.
+ */
+ public static final String FINDER_CLASS_NAME_ENTITY = UserMailSynchronisationImpl.class.getName();
+ public static final String FINDER_CLASS_NAME_LIST_WITH_PAGINATION = FINDER_CLASS_NAME_ENTITY +
+ ".List1";
+ public static final String FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION = FINDER_CLASS_NAME_ENTITY +
+ ".List2";
+ public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_ALL = new FinderPath(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationModelImpl.FINDER_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ FINDER_CLASS_NAME_LIST_WITH_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL = new FinderPath(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationModelImpl.FINDER_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "findAll", new String[0]);
+ public static final FinderPath FINDER_PATH_COUNT_ALL = new FinderPath(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationModelImpl.FINDER_CACHE_ENABLED, Long.class,
+ FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countAll", new String[0]);
+
+ /**
+ * Caches the user mail synchronisation in the entity cache if it is enabled.
+ *
+ * @param userMailSynchronisation the user mail synchronisation
+ */
+ public void cacheResult(UserMailSynchronisation userMailSynchronisation) {
+ EntityCacheUtil.putResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ userMailSynchronisation.getPrimaryKey(), userMailSynchronisation);
+
+ userMailSynchronisation.resetOriginalValues();
+ }
+
+ /**
+ * Caches the user mail synchronisations in the entity cache if it is enabled.
+ *
+ * @param userMailSynchronisations the user mail synchronisations
+ */
+ public void cacheResult(
+ List<UserMailSynchronisation> userMailSynchronisations) {
+ for (UserMailSynchronisation userMailSynchronisation : userMailSynchronisations) {
+ if (EntityCacheUtil.getResult(
+ UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ userMailSynchronisation.getPrimaryKey()) == null) {
+ cacheResult(userMailSynchronisation);
+ }
+ else {
+ userMailSynchronisation.resetOriginalValues();
+ }
+ }
+ }
+
+ /**
+ * Clears the cache for all user mail synchronisations.
+ *
+ * <p>
+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
+ * </p>
+ */
+ @Override
+ public void clearCache() {
+ if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) {
+ CacheRegistryUtil.clear(UserMailSynchronisationImpl.class.getName());
+ }
+
+ EntityCacheUtil.clearCache(UserMailSynchronisationImpl.class.getName());
+
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY);
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
+ }
+
+ /**
+ * Clears the cache for the user mail synchronisation.
+ *
+ * <p>
+ * The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method.
+ * </p>
+ */
+ @Override
+ public void clearCache(UserMailSynchronisation userMailSynchronisation) {
+ EntityCacheUtil.removeResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ userMailSynchronisation.getPrimaryKey());
+
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
+ }
+
+ @Override
+ public void clearCache(
+ List<UserMailSynchronisation> userMailSynchronisations) {
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
+
+ for (UserMailSynchronisation userMailSynchronisation : userMailSynchronisations) {
+ EntityCacheUtil.removeResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ userMailSynchronisation.getPrimaryKey());
+ }
+ }
+
+ /**
+ * Creates a new user mail synchronisation with the primary key. Does not add the user mail synchronisation to the database.
+ *
+ * @param userId the primary key for the new user mail synchronisation
+ * @return the new user mail synchronisation
+ */
+ public UserMailSynchronisation create(long userId) {
+ UserMailSynchronisation userMailSynchronisation = new UserMailSynchronisationImpl();
+
+ userMailSynchronisation.setNew(true);
+ userMailSynchronisation.setPrimaryKey(userId);
+
+ return userMailSynchronisation;
+ }
+
+ /**
+ * Removes the user mail synchronisation with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param userId the primary key of the user mail synchronisation
+ * @return the user mail synchronisation that was removed
+ * @throws com.pentila.entSavoie.userProperties.NoSuchUserMailSynchronisationException if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public UserMailSynchronisation remove(long userId)
+ throws NoSuchUserMailSynchronisationException, SystemException {
+ return remove(Long.valueOf(userId));
+ }
+
+ /**
+ * Removes the user mail synchronisation with the primary key from the database. Also notifies the appropriate model listeners.
+ *
+ * @param primaryKey the primary key of the user mail synchronisation
+ * @return the user mail synchronisation that was removed
+ * @throws com.pentila.entSavoie.userProperties.NoSuchUserMailSynchronisationException if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public UserMailSynchronisation remove(Serializable primaryKey)
+ throws NoSuchUserMailSynchronisationException, SystemException {
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ UserMailSynchronisation userMailSynchronisation = (UserMailSynchronisation)session.get(UserMailSynchronisationImpl.class,
+ primaryKey);
+
+ if (userMailSynchronisation == null) {
+ if (_log.isWarnEnabled()) {
+ _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
+ }
+
+ throw new NoSuchUserMailSynchronisationException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
+ primaryKey);
+ }
+
+ return remove(userMailSynchronisation);
+ }
+ catch (NoSuchUserMailSynchronisationException nsee) {
+ throw nsee;
+ }
+ catch (Exception e) {
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+ }
+
+ @Override
+ protected UserMailSynchronisation removeImpl(
+ UserMailSynchronisation userMailSynchronisation)
+ throws SystemException {
+ userMailSynchronisation = toUnwrappedModel(userMailSynchronisation);
+
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ BatchSessionUtil.delete(session, userMailSynchronisation);
+ }
+ catch (Exception e) {
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+
+ clearCache(userMailSynchronisation);
+
+ return userMailSynchronisation;
+ }
+
+ @Override
+ public UserMailSynchronisation updateImpl(
+ com.pentila.entSavoie.userProperties.model.UserMailSynchronisation userMailSynchronisation,
+ boolean merge) throws SystemException {
+ userMailSynchronisation = toUnwrappedModel(userMailSynchronisation);
+
+ boolean isNew = userMailSynchronisation.isNew();
+
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ BatchSessionUtil.update(session, userMailSynchronisation, merge);
+
+ userMailSynchronisation.setNew(false);
+ }
+ catch (Exception e) {
+ throw processException(e);
+ }
+ finally {
+ closeSession(session);
+ }
+
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
+
+ if (isNew) {
+ FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
+ }
+
+ EntityCacheUtil.putResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class,
+ userMailSynchronisation.getPrimaryKey(), userMailSynchronisation);
+
+ return userMailSynchronisation;
+ }
+
+ protected UserMailSynchronisation toUnwrappedModel(
+ UserMailSynchronisation userMailSynchronisation) {
+ if (userMailSynchronisation instanceof UserMailSynchronisationImpl) {
+ return userMailSynchronisation;
+ }
+
+ UserMailSynchronisationImpl userMailSynchronisationImpl = new UserMailSynchronisationImpl();
+
+ userMailSynchronisationImpl.setNew(userMailSynchronisation.isNew());
+ userMailSynchronisationImpl.setPrimaryKey(userMailSynchronisation.getPrimaryKey());
+
+ userMailSynchronisationImpl.setUserId(userMailSynchronisation.getUserId());
+ userMailSynchronisationImpl.setLastSynchronisation(userMailSynchronisation.getLastSynchronisation());
+
+ return userMailSynchronisationImpl;
+ }
+
+ /**
+ * Returns the user mail synchronisation with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found.
+ *
+ * @param primaryKey the primary key of the user mail synchronisation
+ * @return the user mail synchronisation
+ * @throws com.liferay.portal.NoSuchModelException if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public UserMailSynchronisation findByPrimaryKey(Serializable primaryKey)
+ throws NoSuchModelException, SystemException {
+ return findByPrimaryKey(((Long)primaryKey).longValue());
+ }
+
+ /**
+ * Returns the user mail synchronisation with the primary key or throws a {@link com.pentila.entSavoie.userProperties.NoSuchUserMailSynchronisationException} if it could not be found.
+ *
+ * @param userId the primary key of the user mail synchronisation
+ * @return the user mail synchronisation
+ * @throws com.pentila.entSavoie.userProperties.NoSuchUserMailSynchronisationException if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public UserMailSynchronisation findByPrimaryKey(long userId)
+ throws NoSuchUserMailSynchronisationException, SystemException {
+ UserMailSynchronisation userMailSynchronisation = fetchByPrimaryKey(userId);
+
+ if (userMailSynchronisation == null) {
+ if (_log.isWarnEnabled()) {
+ _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + userId);
+ }
+
+ throw new NoSuchUserMailSynchronisationException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
+ userId);
+ }
+
+ return userMailSynchronisation;
+ }
+
+ /**
+ * Returns the user mail synchronisation with the primary key or returns <code>null</code> if it could not be found.
+ *
+ * @param primaryKey the primary key of the user mail synchronisation
+ * @return the user mail synchronisation, or <code>null</code> if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ @Override
+ public UserMailSynchronisation fetchByPrimaryKey(Serializable primaryKey)
+ throws SystemException {
+ return fetchByPrimaryKey(((Long)primaryKey).longValue());
+ }
+
+ /**
+ * Returns the user mail synchronisation with the primary key or returns <code>null</code> if it could not be found.
+ *
+ * @param userId the primary key of the user mail synchronisation
+ * @return the user mail synchronisation, or <code>null</code> if a user mail synchronisation with the primary key could not be found
+ * @throws SystemException if a system exception occurred
+ */
+ public UserMailSynchronisation fetchByPrimaryKey(long userId)
+ throws SystemException {
+ UserMailSynchronisation userMailSynchronisation = (UserMailSynchronisation)EntityCacheUtil.getResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class, userId);
+
+ if (userMailSynchronisation == _nullUserMailSynchronisation) {
+ return null;
+ }
+
+ if (userMailSynchronisation == null) {
+ Session session = null;
+
+ boolean hasException = false;
+
+ try {
+ session = openSession();
+
+ userMailSynchronisation = (UserMailSynchronisation)session.get(UserMailSynchronisationImpl.class,
+ Long.valueOf(userId));
+ }
+ catch (Exception e) {
+ hasException = true;
+
+ throw processException(e);
+ }
+ finally {
+ if (userMailSynchronisation != null) {
+ cacheResult(userMailSynchronisation);
+ }
+ else if (!hasException) {
+ EntityCacheUtil.putResult(UserMailSynchronisationModelImpl.ENTITY_CACHE_ENABLED,
+ UserMailSynchronisationImpl.class, userId,
+ _nullUserMailSynchronisation);
+ }
+
+ closeSession(session);
+ }
+ }
+
+ return userMailSynchronisation;
+ }
+
+ /**
+ * Returns all the user mail synchronisations.
+ *
+ * @return the user mail synchronisations
+ * @throws SystemException if a system exception occurred
+ */
+ public List<UserMailSynchronisation> findAll() throws SystemException {
+ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
+ }
+
+ /**
+ * Returns a range of all the user mail synchronisations.
+ *
+ * <p>
+ * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
+ * </p>
+ *
+ * @param start the lower bound of the range of user mail synchronisations
+ * @param end the upper bound of the range of user mail synchronisations (not inclusive)
+ * @return the range of user mail synchronisations
+ * @throws SystemException if a system exception occurred
+ */
+ public List<UserMailSynchronisation> findAll(int start, int end)
+ throws SystemException {
+ return findAll(start, end, null);
+ }
+
+ /**
+ * Returns an ordered range of all the user mail synchronisations.
+ *
+ * <p>
+ * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
+ * </p>
+ *
+ * @param start the lower bound of the range of user mail synchronisations
+ * @param end the upper bound of the range of user mail synchronisations (not inclusive)
+ * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
+ * @return the ordered range of user mail synchronisations
+ * @throws SystemException if a system exception occurred
+ */
+ public List<UserMailSynchronisation> findAll(int start, int end,
+ OrderByComparator orderByComparator) throws SystemException {
+ FinderPath finderPath = null;
+ Object[] finderArgs = new Object[] { start, end, orderByComparator };
+
+ if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
+ (orderByComparator == null)) {
+ finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_ALL;
+ finderArgs = FINDER_ARGS_EMPTY;
+ }
+ else {
+ finderPath = FINDER_PATH_WITH_PAGINATION_FIND_ALL;
+ finderArgs = new Object[] { start, end, orderByComparator };
+ }
+
+ List<UserMailSynchronisation> list = (List<UserMailSynchronisation>)FinderCacheUtil.getResult(finderPath,
+ finderArgs, this);
+
+ if (list == null) {
+ StringBundler query = null;
+ String sql = null;
+
+ if (orderByComparator != null) {
+ query = new StringBundler(2 +
+ (orderByComparator.getOrderByFields().length * 3));
+
+ query.append(_SQL_SELECT_USERMAILSYNCHRONISATION);
+
+ appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
+ orderByComparator);
+
+ sql = query.toString();
+ }
+ else {
+ sql = _SQL_SELECT_USERMAILSYNCHRONISATION;
+ }
+
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ Query q = session.createQuery(sql);
+
+ if (orderByComparator == null) {
+ list = (List<UserMailSynchronisation>)QueryUtil.list(q,
+ getDialect(), start, end, false);
+
+ Collections.sort(list);
+ }
+ else {
+ list = (List<UserMailSynchronisation>)QueryUtil.list(q,
+ getDialect(), start, end);
+ }
+ }
+ catch (Exception e) {
+ throw processException(e);
+ }
+ finally {
+ if (list == null) {
+ FinderCacheUtil.removeResult(finderPath, finderArgs);
+ }
+ else {
+ cacheResult(list);
+
+ FinderCacheUtil.putResult(finderPath, finderArgs, list);
+ }
+
+ closeSession(session);
+ }
+ }
+
+ return list;
+ }
+
+ /**
+ * Removes all the user mail synchronisations from the database.
+ *
+ * @throws SystemException if a system exception occurred
+ */
+ public void removeAll() throws SystemException {
+ for (UserMailSynchronisation userMailSynchronisation : findAll()) {
+ remove(userMailSynchronisation);
+ }
+ }
+
+ /**
+ * Returns the number of user mail synchronisations.
+ *
+ * @return the number of user mail synchronisations
+ * @throws SystemException if a system exception occurred
+ */
+ public int countAll() throws SystemException {
+ Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
+ FINDER_ARGS_EMPTY, this);
+
+ if (count == null) {
+ Session session = null;
+
+ try {
+ session = openSession();
+
+ Query q = session.createQuery(_SQL_COUNT_USERMAILSYNCHRONISATION);
+
+ count = (Long)q.uniqueResult();
+ }
+ catch (Exception e) {
+ throw processException(e);
+ }
+ finally {
+ if (count == null) {
+ count = Long.valueOf(0);
+ }
+
+ FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
+ FINDER_ARGS_EMPTY, count);
+
+ closeSession(session);
+ }
+ }
+
+ return count.intValue();
+ }
+
+ /**
+ * Initializes the user mail synchronisation persistence.
+ */
+ public void afterPropertiesSet() {
+ String[] listenerClassNames = StringUtil.split(GetterUtil.getString(
+ com.liferay.util.service.ServiceProps.get(
+ "value.object.listener.com.pentila.entSavoie.userProperties.model.UserMailSynchronisation")));
+
+ if (listenerClassNames.length > 0) {
+ try {
+ List<ModelListener<UserMailSynchronisation>> listenersList = new ArrayList<ModelListener<UserMailSynchronisation>>();
+
+ for (String listenerClassName : listenerClassNames) {
+ listenersList.add((ModelListener<UserMailSynchronisation>)InstanceFactory.newInstance(
+ PortletClassLoaderUtil.getClassLoader(),
+ listenerClassName, (Class<?>[])null, (Object[])null));
+ }
+
+ listeners = listenersList.toArray(new ModelListener[listenersList.size()]);
+ }
+ catch (Exception e) {
+ _log.error(e);
+ }
+ }
+ }
+
+ public void destroy() {
+ EntityCacheUtil.removeCache(UserMailSynchronisationImpl.class.getName());
+ FinderCacheUtil.removeCache(FINDER_CLASS_NAME_ENTITY);
+ FinderCacheUtil.removeCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
+ }
+
+ @BeanReference(type = DashboardConfigPersistence.class)
+ protected DashboardConfigPersistence dashboardConfigPersistence;
+ @BeanReference(type = DashboardDefaultConfigPersistence.class)
+ protected DashboardDefaultConfigPersistence dashboardDefaultConfigPersistence;
+ @BeanReference(type = InternalOauthPersistence.class)
+ protected InternalOauthPersistence internalOauthPersistence;
+ @BeanReference(type = NotifyConfigPersistence.class)
+ protected NotifyConfigPersistence notifyConfigPersistence;
+ @BeanReference(type = UserContactPersistence.class)
+ protected UserContactPersistence userContactPersistence;
+ @BeanReference(type = UserInternalSSOPersistence.class)
+ protected UserInternalSSOPersistence userInternalSSOPersistence;
+ @BeanReference(type = UserMailSynchronisationPersistence.class)
+ protected UserMailSynchronisationPersistence userMailSynchronisationPersistence;
+ @BeanReference(type = UserMatchingPersistence.class)
+ protected UserMatchingPersistence userMatchingPersistence;
+ @BeanReference(type = UserMobileNotificationPersistence.class)
+ protected UserMobileNotificationPersistence userMobileNotificationPersistence;
+ @BeanReference(type = UserPropertiesPersistence.class)
+ protected UserPropertiesPersistence userPropertiesPersistence;
+ @BeanReference(type = UserRelationshipPersistence.class)
+ protected UserRelationshipPersistence userRelationshipPersistence;
+ @BeanReference(type = ResourcePersistence.class)
+ protected ResourcePersistence resourcePersistence;
+ @BeanReference(type = UserPersistence.class)
+ protected UserPersistence userPersistence;
+ private static final String _SQL_SELECT_USERMAILSYNCHRONISATION = "SELECT userMailSynchronisation FROM UserMailSynchronisation userMailSynchronisation";
+ private static final String _SQL_COUNT_USERMAILSYNCHRONISATION = "SELECT COUNT(userMailSynchronisation) FROM UserMailSynchronisation userMailSynchronisation";
+ private static final String _ORDER_BY_ENTITY_ALIAS = "userMailSynchronisation.";
+ private static final String _NO_SUCH_ENTITY_WITH_PRIMARY_KEY = "No UserMailSynchronisation exists with the primary key ";
+ private static final boolean _HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE = GetterUtil.getBoolean(PropsUtil.get(
+ PropsKeys.HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE));
+ private static Log _log = LogFactoryUtil.getLog(UserMailSynchronisationPersistenceImpl.class);
+ private static UserMailSynchronisation _nullUserMailSynchronisation = new UserMailSynchronisationImpl() {
+ @Override
+ public Object clone() {
+ return this;
+ }
+
+ @Override
+ public CacheModel<UserMailSynchronisation> toCacheModel() {
+ return _nullUserMailSynchronisationCacheModel;
+ }
+ };
+
+ private static CacheModel<UserMailSynchronisation> _nullUserMailSynchronisationCacheModel =
+ new CacheModel<UserMailSynchronisation>() {
+ public UserMailSynchronisation toEntityModel() {
+ return _nullUserMailSynchronisation;
+ }
+ };
+}
\ No newline at end of file