001
014
015 package com.liferay.mail.service.persistence;
016
017 import com.liferay.mail.NoSuchCyrusUserException;
018 import com.liferay.mail.model.CyrusUser;
019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020 import com.liferay.portal.kernel.exception.SystemException;
021
022
025 public class CyrusUserUtil {
026
027 public static CyrusUser findByPrimaryKey(long userId)
028 throws NoSuchCyrusUserException, SystemException {
029
030 return getPersistence().findByPrimaryKey(userId);
031 }
032
033 public static CyrusUserPersistence getPersistence() {
034 if (_persistence == null) {
035 _persistence = (CyrusUserPersistence)PortalBeanLocatorUtil.locate(
036 CyrusUserPersistence.class.getName());
037 }
038
039 return _persistence;
040 }
041
042 public static void remove(long userId)
043 throws NoSuchCyrusUserException, SystemException {
044
045 getPersistence().remove(userId);
046 }
047
048 public static void update(CyrusUser user) throws SystemException {
049 getPersistence().update(user);
050 }
051
052 public void setPersistence(CyrusUserPersistence persistence) {
053 _persistence = persistence;
054 }
055
056 private static CyrusUserPersistence _persistence;
057
058 }