001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portal.service.persistence;
022:
023: /**
024: * <a href="PasswordPolicyUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class PasswordPolicyUtil {
030: public static com.liferay.portal.model.PasswordPolicy create(
031: long passwordPolicyId) {
032: return getPersistence().create(passwordPolicyId);
033: }
034:
035: public static com.liferay.portal.model.PasswordPolicy remove(
036: long passwordPolicyId)
037: throws com.liferay.portal.SystemException,
038: com.liferay.portal.NoSuchPasswordPolicyException {
039: return getPersistence().remove(passwordPolicyId);
040: }
041:
042: public static com.liferay.portal.model.PasswordPolicy remove(
043: com.liferay.portal.model.PasswordPolicy passwordPolicy)
044: throws com.liferay.portal.SystemException {
045: return getPersistence().remove(passwordPolicy);
046: }
047:
048: public static com.liferay.portal.model.PasswordPolicy update(
049: com.liferay.portal.model.PasswordPolicy passwordPolicy)
050: throws com.liferay.portal.SystemException {
051: return getPersistence().update(passwordPolicy);
052: }
053:
054: public static com.liferay.portal.model.PasswordPolicy update(
055: com.liferay.portal.model.PasswordPolicy passwordPolicy,
056: boolean merge) throws com.liferay.portal.SystemException {
057: return getPersistence().update(passwordPolicy, merge);
058: }
059:
060: public static com.liferay.portal.model.PasswordPolicy updateImpl(
061: com.liferay.portal.model.PasswordPolicy passwordPolicy,
062: boolean merge) throws com.liferay.portal.SystemException {
063: return getPersistence().updateImpl(passwordPolicy, merge);
064: }
065:
066: public static com.liferay.portal.model.PasswordPolicy findByPrimaryKey(
067: long passwordPolicyId)
068: throws com.liferay.portal.SystemException,
069: com.liferay.portal.NoSuchPasswordPolicyException {
070: return getPersistence().findByPrimaryKey(passwordPolicyId);
071: }
072:
073: public static com.liferay.portal.model.PasswordPolicy fetchByPrimaryKey(
074: long passwordPolicyId)
075: throws com.liferay.portal.SystemException {
076: return getPersistence().fetchByPrimaryKey(passwordPolicyId);
077: }
078:
079: public static com.liferay.portal.model.PasswordPolicy findByC_DP(
080: long companyId, boolean defaultPolicy)
081: throws com.liferay.portal.SystemException,
082: com.liferay.portal.NoSuchPasswordPolicyException {
083: return getPersistence().findByC_DP(companyId, defaultPolicy);
084: }
085:
086: public static com.liferay.portal.model.PasswordPolicy fetchByC_DP(
087: long companyId, boolean defaultPolicy)
088: throws com.liferay.portal.SystemException {
089: return getPersistence().fetchByC_DP(companyId, defaultPolicy);
090: }
091:
092: public static com.liferay.portal.model.PasswordPolicy findByC_N(
093: long companyId, java.lang.String name)
094: throws com.liferay.portal.SystemException,
095: com.liferay.portal.NoSuchPasswordPolicyException {
096: return getPersistence().findByC_N(companyId, name);
097: }
098:
099: public static com.liferay.portal.model.PasswordPolicy fetchByC_N(
100: long companyId, java.lang.String name)
101: throws com.liferay.portal.SystemException {
102: return getPersistence().fetchByC_N(companyId, name);
103: }
104:
105: public static java.util.List findWithDynamicQuery(
106: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
107: throws com.liferay.portal.SystemException {
108: return getPersistence().findWithDynamicQuery(queryInitializer);
109: }
110:
111: public static java.util.List findWithDynamicQuery(
112: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
113: int begin, int end)
114: throws com.liferay.portal.SystemException {
115: return getPersistence().findWithDynamicQuery(queryInitializer,
116: begin, end);
117: }
118:
119: public static java.util.List findAll()
120: throws com.liferay.portal.SystemException {
121: return getPersistence().findAll();
122: }
123:
124: public static java.util.List findAll(int begin, int end)
125: throws com.liferay.portal.SystemException {
126: return getPersistence().findAll(begin, end);
127: }
128:
129: public static java.util.List findAll(int begin, int end,
130: com.liferay.portal.kernel.util.OrderByComparator obc)
131: throws com.liferay.portal.SystemException {
132: return getPersistence().findAll(begin, end, obc);
133: }
134:
135: public static void removeByC_DP(long companyId,
136: boolean defaultPolicy)
137: throws com.liferay.portal.SystemException,
138: com.liferay.portal.NoSuchPasswordPolicyException {
139: getPersistence().removeByC_DP(companyId, defaultPolicy);
140: }
141:
142: public static void removeByC_N(long companyId, java.lang.String name)
143: throws com.liferay.portal.SystemException,
144: com.liferay.portal.NoSuchPasswordPolicyException {
145: getPersistence().removeByC_N(companyId, name);
146: }
147:
148: public static void removeAll()
149: throws com.liferay.portal.SystemException {
150: getPersistence().removeAll();
151: }
152:
153: public static int countByC_DP(long companyId, boolean defaultPolicy)
154: throws com.liferay.portal.SystemException {
155: return getPersistence().countByC_DP(companyId, defaultPolicy);
156: }
157:
158: public static int countByC_N(long companyId, java.lang.String name)
159: throws com.liferay.portal.SystemException {
160: return getPersistence().countByC_N(companyId, name);
161: }
162:
163: public static int countAll()
164: throws com.liferay.portal.SystemException {
165: return getPersistence().countAll();
166: }
167:
168: public static PasswordPolicyPersistence getPersistence() {
169: return _getUtil()._persistence;
170: }
171:
172: public void setPersistence(PasswordPolicyPersistence persistence) {
173: _persistence = persistence;
174: }
175:
176: private static PasswordPolicyUtil _getUtil() {
177: if (_util == null) {
178: _util = (PasswordPolicyUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
179: .locate(_UTIL);
180: }
181:
182: return _util;
183: }
184:
185: private static final String _UTIL = PasswordPolicyUtil.class
186: .getName();
187: private static PasswordPolicyUtil _util;
188: private PasswordPolicyPersistence _persistence;
189: }
|