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