1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17   * SOFTWARE.
18   */
19  
20  package com.liferay.portlet.tags.service.persistence;
21  
22  import com.liferay.portal.service.persistence.BasePersistence;
23  
24  /**
25   * <a href="TagsEntryPersistence.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   *
29   */
30  public interface TagsEntryPersistence extends BasePersistence {
31      public void cacheResult(com.liferay.portlet.tags.model.TagsEntry tagsEntry);
32  
33      public void cacheResult(
34          java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries);
35  
36      public void clearCache();
37  
38      public com.liferay.portlet.tags.model.TagsEntry create(long entryId);
39  
40      public com.liferay.portlet.tags.model.TagsEntry remove(long entryId)
41          throws com.liferay.portal.SystemException,
42              com.liferay.portlet.tags.NoSuchEntryException;
43  
44      public com.liferay.portlet.tags.model.TagsEntry remove(
45          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
46          throws com.liferay.portal.SystemException;
47  
48      /**
49       * @deprecated Use <code>update(TagsEntry tagsEntry, boolean merge)</code>.
50       */
51      public com.liferay.portlet.tags.model.TagsEntry update(
52          com.liferay.portlet.tags.model.TagsEntry tagsEntry)
53          throws com.liferay.portal.SystemException;
54  
55      /**
56       * Add, update, or merge, the entity. This method also calls the model
57       * listeners to trigger the proper events associated with adding, deleting,
58       * or updating an entity.
59       *
60       * @param        tagsEntry the entity to add, update, or merge
61       * @param        merge boolean value for whether to merge the entity. The
62       *                default value is false. Setting merge to true is more
63       *                expensive and should only be true when tagsEntry is
64       *                transient. See LEP-5473 for a detailed discussion of this
65       *                method.
66       * @return        true if the portlet can be displayed via Ajax
67       */
68      public com.liferay.portlet.tags.model.TagsEntry update(
69          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portlet.tags.model.TagsEntry updateImpl(
73          com.liferay.portlet.tags.model.TagsEntry tagsEntry, boolean merge)
74          throws com.liferay.portal.SystemException;
75  
76      public com.liferay.portlet.tags.model.TagsEntry findByPrimaryKey(
77          long entryId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portlet.tags.NoSuchEntryException;
80  
81      public com.liferay.portlet.tags.model.TagsEntry fetchByPrimaryKey(
82          long entryId) throws com.liferay.portal.SystemException;
83  
84      public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
85          long vocabularyId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
88          long vocabularyId, int start, int end)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByVocabularyId(
92          long vocabularyId, int start, int end,
93          com.liferay.portal.kernel.util.OrderByComparator obc)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_First(
97          long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.SystemException,
99              com.liferay.portlet.tags.NoSuchEntryException;
100 
101     public com.liferay.portlet.tags.model.TagsEntry findByVocabularyId_Last(
102         long vocabularyId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.SystemException,
104             com.liferay.portlet.tags.NoSuchEntryException;
105 
106     public com.liferay.portlet.tags.model.TagsEntry[] findByVocabularyId_PrevAndNext(
107         long entryId, long vocabularyId,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.SystemException,
110             com.liferay.portlet.tags.NoSuchEntryException;
111 
112     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
113         long parentEntryId, long vocabularyId)
114         throws com.liferay.portal.SystemException;
115 
116     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
117         long parentEntryId, long vocabularyId, int start, int end)
118         throws com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findByP_V(
121         long parentEntryId, long vocabularyId, int start, int end,
122         com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException;
124 
125     public com.liferay.portlet.tags.model.TagsEntry findByP_V_First(
126         long parentEntryId, long vocabularyId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portlet.tags.NoSuchEntryException;
130 
131     public com.liferay.portlet.tags.model.TagsEntry findByP_V_Last(
132         long parentEntryId, long vocabularyId,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portlet.tags.NoSuchEntryException;
136 
137     public com.liferay.portlet.tags.model.TagsEntry[] findByP_V_PrevAndNext(
138         long entryId, long parentEntryId, long vocabularyId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.SystemException,
141             com.liferay.portlet.tags.NoSuchEntryException;
142 
143     public java.util.List<Object> findWithDynamicQuery(
144         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
145         throws com.liferay.portal.SystemException;
146 
147     public java.util.List<Object> findWithDynamicQuery(
148         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
149         int end) throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
152         throws com.liferay.portal.SystemException;
153 
154     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
155         int start, int end) throws com.liferay.portal.SystemException;
156 
157     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
158         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException;
160 
161     public void removeByVocabularyId(long vocabularyId)
162         throws com.liferay.portal.SystemException;
163 
164     public void removeByP_V(long parentEntryId, long vocabularyId)
165         throws com.liferay.portal.SystemException;
166 
167     public void removeAll() throws com.liferay.portal.SystemException;
168 
169     public int countByVocabularyId(long vocabularyId)
170         throws com.liferay.portal.SystemException;
171 
172     public int countByP_V(long parentEntryId, long vocabularyId)
173         throws com.liferay.portal.SystemException;
174 
175     public int countAll() throws com.liferay.portal.SystemException;
176 
177     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
178         long pk) throws com.liferay.portal.SystemException;
179 
180     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
181         long pk, int start, int end) throws com.liferay.portal.SystemException;
182 
183     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
184         long pk, int start, int end,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException;
187 
188     public int getTagsAssetsSize(long pk)
189         throws com.liferay.portal.SystemException;
190 
191     public boolean containsTagsAsset(long pk, long tagsAssetPK)
192         throws com.liferay.portal.SystemException;
193 
194     public boolean containsTagsAssets(long pk)
195         throws com.liferay.portal.SystemException;
196 
197     public void addTagsAsset(long pk, long tagsAssetPK)
198         throws com.liferay.portal.SystemException;
199 
200     public void addTagsAsset(long pk,
201         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
202         throws com.liferay.portal.SystemException;
203 
204     public void addTagsAssets(long pk, long[] tagsAssetPKs)
205         throws com.liferay.portal.SystemException;
206 
207     public void addTagsAssets(long pk,
208         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
209         throws com.liferay.portal.SystemException;
210 
211     public void clearTagsAssets(long pk)
212         throws com.liferay.portal.SystemException;
213 
214     public void removeTagsAsset(long pk, long tagsAssetPK)
215         throws com.liferay.portal.SystemException;
216 
217     public void removeTagsAsset(long pk,
218         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeTagsAssets(long pk, long[] tagsAssetPKs)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeTagsAssets(long pk,
225         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
226         throws com.liferay.portal.SystemException;
227 
228     public void setTagsAssets(long pk, long[] tagsAssetPKs)
229         throws com.liferay.portal.SystemException;
230 
231     public void setTagsAssets(long pk,
232         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
233         throws com.liferay.portal.SystemException;
234 }