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