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="ResourceCodeUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class ResourceCodeUtil {
030: public static com.liferay.portal.model.ResourceCode create(
031: long codeId) {
032: return getPersistence().create(codeId);
033: }
034:
035: public static com.liferay.portal.model.ResourceCode remove(
036: long codeId) throws com.liferay.portal.SystemException,
037: com.liferay.portal.NoSuchResourceCodeException {
038: return getPersistence().remove(codeId);
039: }
040:
041: public static com.liferay.portal.model.ResourceCode remove(
042: com.liferay.portal.model.ResourceCode resourceCode)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(resourceCode);
045: }
046:
047: public static com.liferay.portal.model.ResourceCode update(
048: com.liferay.portal.model.ResourceCode resourceCode)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(resourceCode);
051: }
052:
053: public static com.liferay.portal.model.ResourceCode update(
054: com.liferay.portal.model.ResourceCode resourceCode,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(resourceCode, merge);
057: }
058:
059: public static com.liferay.portal.model.ResourceCode updateImpl(
060: com.liferay.portal.model.ResourceCode resourceCode,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(resourceCode, merge);
063: }
064:
065: public static com.liferay.portal.model.ResourceCode findByPrimaryKey(
066: long codeId) throws com.liferay.portal.SystemException,
067: com.liferay.portal.NoSuchResourceCodeException {
068: return getPersistence().findByPrimaryKey(codeId);
069: }
070:
071: public static com.liferay.portal.model.ResourceCode fetchByPrimaryKey(
072: long codeId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(codeId);
074: }
075:
076: public static java.util.List findByCompanyId(long companyId)
077: throws com.liferay.portal.SystemException {
078: return getPersistence().findByCompanyId(companyId);
079: }
080:
081: public static java.util.List findByCompanyId(long companyId,
082: int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence().findByCompanyId(companyId, begin, end);
085: }
086:
087: public static java.util.List findByCompanyId(long companyId,
088: int begin, int end,
089: com.liferay.portal.kernel.util.OrderByComparator obc)
090: throws com.liferay.portal.SystemException {
091: return getPersistence().findByCompanyId(companyId, begin, end,
092: obc);
093: }
094:
095: public static com.liferay.portal.model.ResourceCode findByCompanyId_First(
096: long companyId,
097: com.liferay.portal.kernel.util.OrderByComparator obc)
098: throws com.liferay.portal.SystemException,
099: com.liferay.portal.NoSuchResourceCodeException {
100: return getPersistence().findByCompanyId_First(companyId, obc);
101: }
102:
103: public static com.liferay.portal.model.ResourceCode findByCompanyId_Last(
104: long companyId,
105: com.liferay.portal.kernel.util.OrderByComparator obc)
106: throws com.liferay.portal.SystemException,
107: com.liferay.portal.NoSuchResourceCodeException {
108: return getPersistence().findByCompanyId_Last(companyId, obc);
109: }
110:
111: public static com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
112: long codeId, long companyId,
113: com.liferay.portal.kernel.util.OrderByComparator obc)
114: throws com.liferay.portal.SystemException,
115: com.liferay.portal.NoSuchResourceCodeException {
116: return getPersistence().findByCompanyId_PrevAndNext(codeId,
117: companyId, obc);
118: }
119:
120: public static java.util.List findByName(java.lang.String name)
121: throws com.liferay.portal.SystemException {
122: return getPersistence().findByName(name);
123: }
124:
125: public static java.util.List findByName(java.lang.String name,
126: int begin, int end)
127: throws com.liferay.portal.SystemException {
128: return getPersistence().findByName(name, begin, end);
129: }
130:
131: public static java.util.List findByName(java.lang.String name,
132: int begin, int end,
133: com.liferay.portal.kernel.util.OrderByComparator obc)
134: throws com.liferay.portal.SystemException {
135: return getPersistence().findByName(name, begin, end, obc);
136: }
137:
138: public static com.liferay.portal.model.ResourceCode findByName_First(
139: java.lang.String name,
140: com.liferay.portal.kernel.util.OrderByComparator obc)
141: throws com.liferay.portal.SystemException,
142: com.liferay.portal.NoSuchResourceCodeException {
143: return getPersistence().findByName_First(name, obc);
144: }
145:
146: public static com.liferay.portal.model.ResourceCode findByName_Last(
147: java.lang.String name,
148: com.liferay.portal.kernel.util.OrderByComparator obc)
149: throws com.liferay.portal.SystemException,
150: com.liferay.portal.NoSuchResourceCodeException {
151: return getPersistence().findByName_Last(name, obc);
152: }
153:
154: public static com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
155: long codeId, java.lang.String name,
156: com.liferay.portal.kernel.util.OrderByComparator obc)
157: throws com.liferay.portal.SystemException,
158: com.liferay.portal.NoSuchResourceCodeException {
159: return getPersistence().findByName_PrevAndNext(codeId, name,
160: obc);
161: }
162:
163: public static com.liferay.portal.model.ResourceCode findByC_N_S(
164: long companyId, java.lang.String name, int scope)
165: throws com.liferay.portal.SystemException,
166: com.liferay.portal.NoSuchResourceCodeException {
167: return getPersistence().findByC_N_S(companyId, name, scope);
168: }
169:
170: public static com.liferay.portal.model.ResourceCode fetchByC_N_S(
171: long companyId, java.lang.String name, int scope)
172: throws com.liferay.portal.SystemException {
173: return getPersistence().fetchByC_N_S(companyId, name, scope);
174: }
175:
176: public static java.util.List findWithDynamicQuery(
177: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
178: throws com.liferay.portal.SystemException {
179: return getPersistence().findWithDynamicQuery(queryInitializer);
180: }
181:
182: public static java.util.List findWithDynamicQuery(
183: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
184: int begin, int end)
185: throws com.liferay.portal.SystemException {
186: return getPersistence().findWithDynamicQuery(queryInitializer,
187: begin, end);
188: }
189:
190: public static java.util.List findAll()
191: throws com.liferay.portal.SystemException {
192: return getPersistence().findAll();
193: }
194:
195: public static java.util.List findAll(int begin, int end)
196: throws com.liferay.portal.SystemException {
197: return getPersistence().findAll(begin, end);
198: }
199:
200: public static java.util.List findAll(int begin, int end,
201: com.liferay.portal.kernel.util.OrderByComparator obc)
202: throws com.liferay.portal.SystemException {
203: return getPersistence().findAll(begin, end, obc);
204: }
205:
206: public static void removeByCompanyId(long companyId)
207: throws com.liferay.portal.SystemException {
208: getPersistence().removeByCompanyId(companyId);
209: }
210:
211: public static void removeByName(java.lang.String name)
212: throws com.liferay.portal.SystemException {
213: getPersistence().removeByName(name);
214: }
215:
216: public static void removeByC_N_S(long companyId,
217: java.lang.String name, int scope)
218: throws com.liferay.portal.SystemException,
219: com.liferay.portal.NoSuchResourceCodeException {
220: getPersistence().removeByC_N_S(companyId, name, scope);
221: }
222:
223: public static void removeAll()
224: throws com.liferay.portal.SystemException {
225: getPersistence().removeAll();
226: }
227:
228: public static int countByCompanyId(long companyId)
229: throws com.liferay.portal.SystemException {
230: return getPersistence().countByCompanyId(companyId);
231: }
232:
233: public static int countByName(java.lang.String name)
234: throws com.liferay.portal.SystemException {
235: return getPersistence().countByName(name);
236: }
237:
238: public static int countByC_N_S(long companyId,
239: java.lang.String name, int scope)
240: throws com.liferay.portal.SystemException {
241: return getPersistence().countByC_N_S(companyId, name, scope);
242: }
243:
244: public static int countAll()
245: throws com.liferay.portal.SystemException {
246: return getPersistence().countAll();
247: }
248:
249: public static ResourceCodePersistence getPersistence() {
250: return _getUtil()._persistence;
251: }
252:
253: public void setPersistence(ResourceCodePersistence persistence) {
254: _persistence = persistence;
255: }
256:
257: private static ResourceCodeUtil _getUtil() {
258: if (_util == null) {
259: _util = (ResourceCodeUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
260: .locate(_UTIL);
261: }
262:
263: return _util;
264: }
265:
266: private static final String _UTIL = ResourceCodeUtil.class
267: .getName();
268: private static ResourceCodeUtil _util;
269: private ResourceCodePersistence _persistence;
270: }
|