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.PortalException;
23  import com.liferay.portal.SystemException;
24  import com.liferay.portal.kernel.annotation.Propagation;
25  import com.liferay.portal.kernel.annotation.Transactional;
26  import com.liferay.portal.service.persistence.BasePersistence;
27  
28  /**
29   * <a href="TagsAssetPersistence.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   *
33   */
34  @Transactional(rollbackFor =  {
35      PortalException.class, SystemException.class})
36  public interface TagsAssetPersistence extends BasePersistence {
37      public com.liferay.portlet.tags.model.TagsAsset create(long assetId);
38  
39      public com.liferay.portlet.tags.model.TagsAsset remove(long assetId)
40          throws com.liferay.portal.SystemException,
41              com.liferay.portlet.tags.NoSuchAssetException;
42  
43      public com.liferay.portlet.tags.model.TagsAsset remove(
44          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
45          throws com.liferay.portal.SystemException;
46  
47      /**
48       * @deprecated Use <code>update(TagsAsset tagsAsset, boolean merge)</code>.
49       */
50      public com.liferay.portlet.tags.model.TagsAsset update(
51          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * Add, update, or merge, the entity. This method also calls the model
56       * listeners to trigger the proper events associated with adding, deleting,
57       * or updating an entity.
58       *
59       * @param        tagsAsset the entity to add, update, or merge
60       * @param        merge boolean value for whether to merge the entity. The
61       *                default value is false. Setting merge to true is more
62       *                expensive and should only be true when tagsAsset is
63       *                transient. See LEP-5473 for a detailed discussion of this
64       *                method.
65       * @return        true if the portlet can be displayed via Ajax
66       */
67      public com.liferay.portlet.tags.model.TagsAsset update(
68          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portlet.tags.model.TagsAsset updateImpl(
72          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
73          throws com.liferay.portal.SystemException;
74  
75      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
76      public com.liferay.portlet.tags.model.TagsAsset findByPrimaryKey(
77          long assetId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portlet.tags.NoSuchAssetException;
80  
81      public com.liferay.portlet.tags.model.TagsAsset fetchByPrimaryKey(
82          long assetId) throws com.liferay.portal.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
86          long companyId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
90          long companyId, int start, int end)
91          throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
95          long companyId, int start, int end,
96          com.liferay.portal.kernel.util.OrderByComparator obc)
97          throws com.liferay.portal.SystemException;
98  
99      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
100     public com.liferay.portlet.tags.model.TagsAsset findByCompanyId_First(
101         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.tags.NoSuchAssetException;
104 
105     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106     public com.liferay.portlet.tags.model.TagsAsset findByCompanyId_Last(
107         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.tags.NoSuchAssetException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portlet.tags.model.TagsAsset[] findByCompanyId_PrevAndNext(
113         long assetId, long companyId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.tags.NoSuchAssetException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public com.liferay.portlet.tags.model.TagsAsset findByC_C(
120         long classNameId, long classPK)
121         throws com.liferay.portal.SystemException,
122             com.liferay.portlet.tags.NoSuchAssetException;
123 
124     public com.liferay.portlet.tags.model.TagsAsset fetchByC_C(
125         long classNameId, long classPK)
126         throws com.liferay.portal.SystemException;
127 
128     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
129     public java.util.List<Object> findWithDynamicQuery(
130         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
131         throws com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public java.util.List<Object> findWithDynamicQuery(
135         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
136         int end) throws com.liferay.portal.SystemException;
137 
138     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll()
140         throws com.liferay.portal.SystemException;
141 
142     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
143     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
144         int start, int end) throws com.liferay.portal.SystemException;
145 
146     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
147     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
148         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException;
150 
151     public void removeByCompanyId(long companyId)
152         throws com.liferay.portal.SystemException;
153 
154     public void removeByC_C(long classNameId, long classPK)
155         throws com.liferay.portal.SystemException,
156             com.liferay.portlet.tags.NoSuchAssetException;
157 
158     public void removeAll() throws com.liferay.portal.SystemException;
159 
160     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161     public int countByCompanyId(long companyId)
162         throws com.liferay.portal.SystemException;
163 
164     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165     public int countByC_C(long classNameId, long classPK)
166         throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public int countAll() throws com.liferay.portal.SystemException;
170 
171     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
173         long pk) throws com.liferay.portal.SystemException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
177         long pk, int start, int end) throws com.liferay.portal.SystemException;
178 
179     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
181         long pk, int start, int end,
182         com.liferay.portal.kernel.util.OrderByComparator obc)
183         throws com.liferay.portal.SystemException;
184 
185     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186     public int getTagsEntriesSize(long pk)
187         throws com.liferay.portal.SystemException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public boolean containsTagsEntry(long pk, long tagsEntryPK)
191         throws com.liferay.portal.SystemException;
192 
193     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194     public boolean containsTagsEntries(long pk)
195         throws com.liferay.portal.SystemException;
196 
197     public void addTagsEntry(long pk, long tagsEntryPK)
198         throws com.liferay.portal.SystemException;
199 
200     public void addTagsEntry(long pk,
201         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
202         throws com.liferay.portal.SystemException;
203 
204     public void addTagsEntries(long pk, long[] tagsEntryPKs)
205         throws com.liferay.portal.SystemException;
206 
207     public void addTagsEntries(long pk,
208         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
209         throws com.liferay.portal.SystemException;
210 
211     public void clearTagsEntries(long pk)
212         throws com.liferay.portal.SystemException;
213 
214     public void removeTagsEntry(long pk, long tagsEntryPK)
215         throws com.liferay.portal.SystemException;
216 
217     public void removeTagsEntry(long pk,
218         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
219         throws com.liferay.portal.SystemException;
220 
221     public void removeTagsEntries(long pk, long[] tagsEntryPKs)
222         throws com.liferay.portal.SystemException;
223 
224     public void removeTagsEntries(long pk,
225         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
226         throws com.liferay.portal.SystemException;
227 
228     public void setTagsEntries(long pk, long[] tagsEntryPKs)
229         throws com.liferay.portal.SystemException;
230 
231     public void setTagsEntries(long pk,
232         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
233         throws com.liferay.portal.SystemException;
234 }