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