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