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="TagsAssetPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface TagsAssetPersistence extends BasePersistence {
34      public void cacheResult(com.liferay.portlet.tags.model.TagsAsset tagsAsset);
35  
36      public void cacheResult(
37          java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets);
38  
39      public void clearCache();
40  
41      public com.liferay.portlet.tags.model.TagsAsset create(long assetId);
42  
43      public com.liferay.portlet.tags.model.TagsAsset remove(long assetId)
44          throws com.liferay.portal.SystemException,
45              com.liferay.portlet.tags.NoSuchAssetException;
46  
47      public com.liferay.portlet.tags.model.TagsAsset remove(
48          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(TagsAsset tagsAsset, boolean merge)</code>.
53       */
54      public com.liferay.portlet.tags.model.TagsAsset update(
55          com.liferay.portlet.tags.model.TagsAsset tagsAsset)
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        tagsAsset 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 tagsAsset 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.TagsAsset update(
72          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
73          throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portlet.tags.model.TagsAsset updateImpl(
76          com.liferay.portlet.tags.model.TagsAsset tagsAsset, boolean merge)
77          throws com.liferay.portal.SystemException;
78  
79      public com.liferay.portlet.tags.model.TagsAsset findByPrimaryKey(
80          long assetId)
81          throws com.liferay.portal.SystemException,
82              com.liferay.portlet.tags.NoSuchAssetException;
83  
84      public com.liferay.portlet.tags.model.TagsAsset fetchByPrimaryKey(
85          long assetId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
88          long companyId) throws com.liferay.portal.SystemException;
89  
90      public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findByCompanyId(
91          long companyId, int start, int end)
92          throws com.liferay.portal.SystemException;
93  
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      public com.liferay.portlet.tags.model.TagsAsset findByCompanyId_First(
100         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException,
102             com.liferay.portlet.tags.NoSuchAssetException;
103 
104     public com.liferay.portlet.tags.model.TagsAsset findByCompanyId_Last(
105         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portlet.tags.NoSuchAssetException;
108 
109     public com.liferay.portlet.tags.model.TagsAsset[] findByCompanyId_PrevAndNext(
110         long assetId, long companyId,
111         com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException,
113             com.liferay.portlet.tags.NoSuchAssetException;
114 
115     public com.liferay.portlet.tags.model.TagsAsset findByC_C(
116         long classNameId, long classPK)
117         throws com.liferay.portal.SystemException,
118             com.liferay.portlet.tags.NoSuchAssetException;
119 
120     public com.liferay.portlet.tags.model.TagsAsset fetchByC_C(
121         long classNameId, long classPK)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portlet.tags.model.TagsAsset fetchByC_C(
125         long classNameId, long classPK, boolean retrieveFromCache)
126         throws com.liferay.portal.SystemException;
127 
128     public java.util.List<Object> findWithDynamicQuery(
129         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
130         throws com.liferay.portal.SystemException;
131 
132     public java.util.List<Object> findWithDynamicQuery(
133         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
134         int end) throws com.liferay.portal.SystemException;
135 
136     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll()
137         throws com.liferay.portal.SystemException;
138 
139     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
140         int start, int end) throws com.liferay.portal.SystemException;
141 
142     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> findAll(
143         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
144         throws com.liferay.portal.SystemException;
145 
146     public void removeByCompanyId(long companyId)
147         throws com.liferay.portal.SystemException;
148 
149     public void removeByC_C(long classNameId, long classPK)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.tags.NoSuchAssetException;
152 
153     public void removeAll() throws com.liferay.portal.SystemException;
154 
155     public int countByCompanyId(long companyId)
156         throws com.liferay.portal.SystemException;
157 
158     public int countByC_C(long classNameId, long classPK)
159         throws com.liferay.portal.SystemException;
160 
161     public int countAll() throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
164         long pk) throws com.liferay.portal.SystemException;
165 
166     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
167         long pk, int start, int end) throws com.liferay.portal.SystemException;
168 
169     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> getTagsEntries(
170         long pk, int start, int end,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException;
173 
174     public int getTagsEntriesSize(long pk)
175         throws com.liferay.portal.SystemException;
176 
177     public boolean containsTagsEntry(long pk, long tagsEntryPK)
178         throws com.liferay.portal.SystemException;
179 
180     public boolean containsTagsEntries(long pk)
181         throws com.liferay.portal.SystemException;
182 
183     public void addTagsEntry(long pk, long tagsEntryPK)
184         throws com.liferay.portal.SystemException;
185 
186     public void addTagsEntry(long pk,
187         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
188         throws com.liferay.portal.SystemException;
189 
190     public void addTagsEntries(long pk, long[] tagsEntryPKs)
191         throws com.liferay.portal.SystemException;
192 
193     public void addTagsEntries(long pk,
194         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
195         throws com.liferay.portal.SystemException;
196 
197     public void clearTagsEntries(long pk)
198         throws com.liferay.portal.SystemException;
199 
200     public void removeTagsEntry(long pk, long tagsEntryPK)
201         throws com.liferay.portal.SystemException;
202 
203     public void removeTagsEntry(long pk,
204         com.liferay.portlet.tags.model.TagsEntry tagsEntry)
205         throws com.liferay.portal.SystemException;
206 
207     public void removeTagsEntries(long pk, long[] tagsEntryPKs)
208         throws com.liferay.portal.SystemException;
209 
210     public void removeTagsEntries(long pk,
211         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
212         throws com.liferay.portal.SystemException;
213 
214     public void setTagsEntries(long pk, long[] tagsEntryPKs)
215         throws com.liferay.portal.SystemException;
216 
217     public void setTagsEntries(long pk,
218         java.util.List<com.liferay.portlet.tags.model.TagsEntry> tagsEntries)
219         throws com.liferay.portal.SystemException;
220 }