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="PollsVotePersistence.java.html"><b><i>View Source</i></b></a>
025: *
026: * @author Brian Wing Shun Chan
027: *
028: */
029: public interface PollsVotePersistence {
030: public com.liferay.portlet.polls.model.PollsVote create(long voteId);
031:
032: public com.liferay.portlet.polls.model.PollsVote remove(long voteId)
033: throws com.liferay.portal.SystemException,
034: com.liferay.portlet.polls.NoSuchVoteException;
035:
036: public com.liferay.portlet.polls.model.PollsVote remove(
037: com.liferay.portlet.polls.model.PollsVote pollsVote)
038: throws com.liferay.portal.SystemException;
039:
040: public com.liferay.portlet.polls.model.PollsVote update(
041: com.liferay.portlet.polls.model.PollsVote pollsVote)
042: throws com.liferay.portal.SystemException;
043:
044: public com.liferay.portlet.polls.model.PollsVote update(
045: com.liferay.portlet.polls.model.PollsVote pollsVote,
046: boolean merge) throws com.liferay.portal.SystemException;
047:
048: public com.liferay.portlet.polls.model.PollsVote updateImpl(
049: com.liferay.portlet.polls.model.PollsVote pollsVote,
050: boolean merge) throws com.liferay.portal.SystemException;
051:
052: public com.liferay.portlet.polls.model.PollsVote findByPrimaryKey(
053: long voteId) throws com.liferay.portal.SystemException,
054: com.liferay.portlet.polls.NoSuchVoteException;
055:
056: public com.liferay.portlet.polls.model.PollsVote fetchByPrimaryKey(
057: long voteId) throws com.liferay.portal.SystemException;
058:
059: public java.util.List findByQuestionId(long questionId)
060: throws com.liferay.portal.SystemException;
061:
062: public java.util.List findByQuestionId(long questionId, int begin,
063: int end) throws com.liferay.portal.SystemException;
064:
065: public java.util.List findByQuestionId(long questionId, int begin,
066: int end,
067: com.liferay.portal.kernel.util.OrderByComparator obc)
068: throws com.liferay.portal.SystemException;
069:
070: public com.liferay.portlet.polls.model.PollsVote findByQuestionId_First(
071: long questionId,
072: com.liferay.portal.kernel.util.OrderByComparator obc)
073: throws com.liferay.portal.SystemException,
074: com.liferay.portlet.polls.NoSuchVoteException;
075:
076: public com.liferay.portlet.polls.model.PollsVote findByQuestionId_Last(
077: long questionId,
078: com.liferay.portal.kernel.util.OrderByComparator obc)
079: throws com.liferay.portal.SystemException,
080: com.liferay.portlet.polls.NoSuchVoteException;
081:
082: public com.liferay.portlet.polls.model.PollsVote[] findByQuestionId_PrevAndNext(
083: long voteId, long questionId,
084: com.liferay.portal.kernel.util.OrderByComparator obc)
085: throws com.liferay.portal.SystemException,
086: com.liferay.portlet.polls.NoSuchVoteException;
087:
088: public java.util.List findByChoiceId(long choiceId)
089: throws com.liferay.portal.SystemException;
090:
091: public java.util.List findByChoiceId(long choiceId, int begin,
092: int end) throws com.liferay.portal.SystemException;
093:
094: public java.util.List findByChoiceId(long choiceId, int begin,
095: int end,
096: com.liferay.portal.kernel.util.OrderByComparator obc)
097: throws com.liferay.portal.SystemException;
098:
099: public com.liferay.portlet.polls.model.PollsVote findByChoiceId_First(
100: long choiceId,
101: com.liferay.portal.kernel.util.OrderByComparator obc)
102: throws com.liferay.portal.SystemException,
103: com.liferay.portlet.polls.NoSuchVoteException;
104:
105: public com.liferay.portlet.polls.model.PollsVote findByChoiceId_Last(
106: long choiceId,
107: com.liferay.portal.kernel.util.OrderByComparator obc)
108: throws com.liferay.portal.SystemException,
109: com.liferay.portlet.polls.NoSuchVoteException;
110:
111: public com.liferay.portlet.polls.model.PollsVote[] findByChoiceId_PrevAndNext(
112: long voteId, long choiceId,
113: com.liferay.portal.kernel.util.OrderByComparator obc)
114: throws com.liferay.portal.SystemException,
115: com.liferay.portlet.polls.NoSuchVoteException;
116:
117: public com.liferay.portlet.polls.model.PollsVote findByQ_U(
118: long questionId, long userId)
119: throws com.liferay.portal.SystemException,
120: com.liferay.portlet.polls.NoSuchVoteException;
121:
122: public com.liferay.portlet.polls.model.PollsVote fetchByQ_U(
123: long questionId, long userId)
124: throws com.liferay.portal.SystemException;
125:
126: public java.util.List findWithDynamicQuery(
127: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
128: throws com.liferay.portal.SystemException;
129:
130: public java.util.List findWithDynamicQuery(
131: com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
132: int begin, int end)
133: throws com.liferay.portal.SystemException;
134:
135: public java.util.List findAll()
136: throws com.liferay.portal.SystemException;
137:
138: public java.util.List findAll(int begin, int end)
139: throws com.liferay.portal.SystemException;
140:
141: public java.util.List findAll(int begin, int end,
142: com.liferay.portal.kernel.util.OrderByComparator obc)
143: throws com.liferay.portal.SystemException;
144:
145: public void removeByQuestionId(long questionId)
146: throws com.liferay.portal.SystemException;
147:
148: public void removeByChoiceId(long choiceId)
149: throws com.liferay.portal.SystemException;
150:
151: public void removeByQ_U(long questionId, long userId)
152: throws com.liferay.portal.SystemException,
153: com.liferay.portlet.polls.NoSuchVoteException;
154:
155: public void removeAll() throws com.liferay.portal.SystemException;
156:
157: public int countByQuestionId(long questionId)
158: throws com.liferay.portal.SystemException;
159:
160: public int countByChoiceId(long choiceId)
161: throws com.liferay.portal.SystemException;
162:
163: public int countByQ_U(long questionId, long userId)
164: throws com.liferay.portal.SystemException;
165:
166: public int countAll() throws com.liferay.portal.SystemException;
167: }
|