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 com.liferay.portlet.tags.model.TagsEntry findByC_N(long companyId,
85          java.lang.String name)
86          throws com.liferay.portal.SystemException,
87              com.liferay.portlet.tags.NoSuchEntryException;
88  
89      public com.liferay.portlet.tags.model.TagsEntry fetchByC_N(long companyId,
90          java.lang.String name) throws com.liferay.portal.SystemException;
91  
92      public com.liferay.portlet.tags.model.TagsEntry fetchByC_N(long companyId,
93          java.lang.String name, boolean retrieveFromCache)
94          throws com.liferay.portal.SystemException;
95  
96      public java.util.List<Object> findWithDynamicQuery(
97          com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
98          throws com.liferay.portal.SystemException;
99  
100     public java.util.List<Object> findWithDynamicQuery(
101         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
102         int end) throws com.liferay.portal.SystemException;
103 
104     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll()
105         throws com.liferay.portal.SystemException;
106 
107     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
108         int start, int end) throws com.liferay.portal.SystemException;
109 
110     public java.util.List<com.liferay.portlet.tags.model.TagsEntry> findAll(
111         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
112         throws com.liferay.portal.SystemException;
113 
114     public void removeByC_N(long companyId, java.lang.String name)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.tags.NoSuchEntryException;
117 
118     public void removeAll() throws com.liferay.portal.SystemException;
119 
120     public int countByC_N(long companyId, java.lang.String name)
121         throws com.liferay.portal.SystemException;
122 
123     public int countAll() throws com.liferay.portal.SystemException;
124 
125     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
126         long pk) throws com.liferay.portal.SystemException;
127 
128     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
129         long pk, int start, int end) throws com.liferay.portal.SystemException;
130 
131     public java.util.List<com.liferay.portlet.tags.model.TagsAsset> getTagsAssets(
132         long pk, int start, int end,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException;
135 
136     public int getTagsAssetsSize(long pk)
137         throws com.liferay.portal.SystemException;
138 
139     public boolean containsTagsAsset(long pk, long tagsAssetPK)
140         throws com.liferay.portal.SystemException;
141 
142     public boolean containsTagsAssets(long pk)
143         throws com.liferay.portal.SystemException;
144 
145     public void addTagsAsset(long pk, long tagsAssetPK)
146         throws com.liferay.portal.SystemException;
147 
148     public void addTagsAsset(long pk,
149         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
150         throws com.liferay.portal.SystemException;
151 
152     public void addTagsAssets(long pk, long[] tagsAssetPKs)
153         throws com.liferay.portal.SystemException;
154 
155     public void addTagsAssets(long pk,
156         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
157         throws com.liferay.portal.SystemException;
158 
159     public void clearTagsAssets(long pk)
160         throws com.liferay.portal.SystemException;
161 
162     public void removeTagsAsset(long pk, long tagsAssetPK)
163         throws com.liferay.portal.SystemException;
164 
165     public void removeTagsAsset(long pk,
166         com.liferay.portlet.tags.model.TagsAsset tagsAsset)
167         throws com.liferay.portal.SystemException;
168 
169     public void removeTagsAssets(long pk, long[] tagsAssetPKs)
170         throws com.liferay.portal.SystemException;
171 
172     public void removeTagsAssets(long pk,
173         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
174         throws com.liferay.portal.SystemException;
175 
176     public void setTagsAssets(long pk, long[] tagsAssetPKs)
177         throws com.liferay.portal.SystemException;
178 
179     public void setTagsAssets(long pk,
180         java.util.List<com.liferay.portlet.tags.model.TagsAsset> tagsAssets)
181         throws com.liferay.portal.SystemException;
182 }