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.portlet.ratings.service.persistence;
022:
023: /**
024: * <a href="RatingsEntryUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public class RatingsEntryUtil {
030: public static com.liferay.portlet.ratings.model.RatingsEntry create(
031: long entryId) {
032: return getPersistence().create(entryId);
033: }
034:
035: public static com.liferay.portlet.ratings.model.RatingsEntry remove(
036: long entryId) throws com.liferay.portal.SystemException,
037: com.liferay.portlet.ratings.NoSuchEntryException {
038: return getPersistence().remove(entryId);
039: }
040:
041: public static com.liferay.portlet.ratings.model.RatingsEntry remove(
042: com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
043: throws com.liferay.portal.SystemException {
044: return getPersistence().remove(ratingsEntry);
045: }
046:
047: public static com.liferay.portlet.ratings.model.RatingsEntry update(
048: com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry)
049: throws com.liferay.portal.SystemException {
050: return getPersistence().update(ratingsEntry);
051: }
052:
053: public static com.liferay.portlet.ratings.model.RatingsEntry update(
054: com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
055: boolean merge) throws com.liferay.portal.SystemException {
056: return getPersistence().update(ratingsEntry, merge);
057: }
058:
059: public static com.liferay.portlet.ratings.model.RatingsEntry updateImpl(
060: com.liferay.portlet.ratings.model.RatingsEntry ratingsEntry,
061: boolean merge) throws com.liferay.portal.SystemException {
062: return getPersistence().updateImpl(ratingsEntry, merge);
063: }
064:
065: public static com.liferay.portlet.ratings.model.RatingsEntry findByPrimaryKey(
066: long entryId) throws com.liferay.portal.SystemException,
067: com.liferay.portlet.ratings.NoSuchEntryException {
068: return getPersistence().findByPrimaryKey(entryId);
069: }
070:
071: public static com.liferay.portlet.ratings.model.RatingsEntry fetchByPrimaryKey(
072: long entryId) throws com.liferay.portal.SystemException {
073: return getPersistence().fetchByPrimaryKey(entryId);
074: }
075:
076: public static java.util.List findByC_C(long classNameId,
077: long classPK) throws com.liferay.portal.SystemException {
078: return getPersistence().findByC_C(classNameId, classPK);
079: }
080:
081: public static java.util.List findByC_C(long classNameId,
082: long classPK, int begin, int end)
083: throws com.liferay.portal.SystemException {
084: return getPersistence().findByC_C(classNameId, classPK, begin,
085: end);
086: }
087:
088: public static java.util.List findByC_C(long classNameId,
089: long classPK, int begin, int end,
090: com.liferay.portal.kernel.util.OrderByComparator obc)
091: throws com.liferay.portal.SystemException {
092: return getPersistence().findByC_C(classNameId, classPK, begin,
093: end, obc);
094: }
095:
096: public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_First(
097: long classNameId, long classPK,
098: com.liferay.portal.kernel.util.OrderByComparator obc)
099: throws com.liferay.portal.SystemException,
100: com.liferay.portlet.ratings.NoSuchEntryException {
101: return getPersistence().findByC_C_First(classNameId, classPK,
102: obc);
103: }
104:
105: public static com.liferay.portlet.ratings.model.RatingsEntry findByC_C_Last(
106: long classNameId, long classPK,
107: com.liferay.portal.kernel.util.OrderByComparator obc)
108: throws com.liferay.portal.SystemException,
109: com.liferay.portlet.ratings.NoSuchEntryException {
110: return getPersistence().findByC_C_Last(classNameId, classPK,
111: obc);
112: }
113:
114: public static com.liferay.portlet.ratings.model.RatingsEntry[] findByC_C_PrevAndNext(
115: long entryId, long classNameId, long classPK,
116: com.liferay.portal.kernel.util.OrderByComparator obc)
117: throws com.liferay.portal.SystemException,
118: com.liferay.portlet.ratings.NoSuchEntryException {
119: return getPersistence().findByC_C_PrevAndNext(entryId,
120: classNameId, classPK, obc);
121: }
122:
123: public static com.liferay.portlet.ratings.model.RatingsEntry findByU_C_C(
124: long userId, long classNameId, long classPK)
125: throws com.liferay.portal.SystemException,
126: com.liferay.portlet.ratings.NoSuchEntryException {
127: return getPersistence().findByU_C_C(userId, classNameId,
128: classPK);
129: }
130:
131: public static com.liferay.portlet.ratings.model.RatingsEntry fetchByU_C_C(
132: long userId, long classNameId, long classPK)
133: throws com.liferay.portal.SystemException {
134: return getPersistence().fetchByU_C_C(userId, classNameId,
135: classPK);
136: }
137:
138: public static java.util.List findWithDynamicQuery(
139: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
140: throws com.liferay.portal.SystemException {
141: return getPersistence().findWithDynamicQuery(queryInitializer);
142: }
143:
144: public static java.util.List findWithDynamicQuery(
145: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
146: int begin, int end)
147: throws com.liferay.portal.SystemException {
148: return getPersistence().findWithDynamicQuery(queryInitializer,
149: begin, end);
150: }
151:
152: public static java.util.List findAll()
153: throws com.liferay.portal.SystemException {
154: return getPersistence().findAll();
155: }
156:
157: public static java.util.List findAll(int begin, int end)
158: throws com.liferay.portal.SystemException {
159: return getPersistence().findAll(begin, end);
160: }
161:
162: public static java.util.List findAll(int begin, int end,
163: com.liferay.portal.kernel.util.OrderByComparator obc)
164: throws com.liferay.portal.SystemException {
165: return getPersistence().findAll(begin, end, obc);
166: }
167:
168: public static void removeByC_C(long classNameId, long classPK)
169: throws com.liferay.portal.SystemException {
170: getPersistence().removeByC_C(classNameId, classPK);
171: }
172:
173: public static void removeByU_C_C(long userId, long classNameId,
174: long classPK) throws com.liferay.portal.SystemException,
175: com.liferay.portlet.ratings.NoSuchEntryException {
176: getPersistence().removeByU_C_C(userId, classNameId, classPK);
177: }
178:
179: public static void removeAll()
180: throws com.liferay.portal.SystemException {
181: getPersistence().removeAll();
182: }
183:
184: public static int countByC_C(long classNameId, long classPK)
185: throws com.liferay.portal.SystemException {
186: return getPersistence().countByC_C(classNameId, classPK);
187: }
188:
189: public static int countByU_C_C(long userId, long classNameId,
190: long classPK) throws com.liferay.portal.SystemException {
191: return getPersistence().countByU_C_C(userId, classNameId,
192: classPK);
193: }
194:
195: public static int countAll()
196: throws com.liferay.portal.SystemException {
197: return getPersistence().countAll();
198: }
199:
200: public static RatingsEntryPersistence getPersistence() {
201: return _getUtil()._persistence;
202: }
203:
204: public void setPersistence(RatingsEntryPersistence persistence) {
205: _persistence = persistence;
206: }
207:
208: private static RatingsEntryUtil _getUtil() {
209: if (_util == null) {
210: _util = (RatingsEntryUtil) com.liferay.portal.kernel.bean.BeanLocatorUtil
211: .locate(_UTIL);
212: }
213:
214: return _util;
215: }
216:
217: private static final String _UTIL = RatingsEntryUtil.class
218: .getName();
219: private static RatingsEntryUtil _util;
220: private RatingsEntryPersistence _persistence;
221: }
|