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="TagsPropertyPersistence.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 TagsPropertyPersistence extends BasePersistence {
37      public com.liferay.portlet.tags.model.TagsProperty create(long propertyId);
38  
39      public com.liferay.portlet.tags.model.TagsProperty remove(long propertyId)
40          throws com.liferay.portal.SystemException,
41              com.liferay.portlet.tags.NoSuchPropertyException;
42  
43      public com.liferay.portlet.tags.model.TagsProperty remove(
44          com.liferay.portlet.tags.model.TagsProperty tagsProperty)
45          throws com.liferay.portal.SystemException;
46  
47      /**
48       * @deprecated Use <code>update(TagsProperty tagsProperty, boolean merge)</code>.
49       */
50      public com.liferay.portlet.tags.model.TagsProperty update(
51          com.liferay.portlet.tags.model.TagsProperty tagsProperty)
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        tagsProperty 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 tagsProperty 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.TagsProperty update(
68          com.liferay.portlet.tags.model.TagsProperty tagsProperty, boolean merge)
69          throws com.liferay.portal.SystemException;
70  
71      public com.liferay.portlet.tags.model.TagsProperty updateImpl(
72          com.liferay.portlet.tags.model.TagsProperty tagsProperty, boolean merge)
73          throws com.liferay.portal.SystemException;
74  
75      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
76      public com.liferay.portlet.tags.model.TagsProperty findByPrimaryKey(
77          long propertyId)
78          throws com.liferay.portal.SystemException,
79              com.liferay.portlet.tags.NoSuchPropertyException;
80  
81      public com.liferay.portlet.tags.model.TagsProperty fetchByPrimaryKey(
82          long propertyId) throws com.liferay.portal.SystemException;
83  
84      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
85      public java.util.List<com.liferay.portlet.tags.model.TagsProperty> 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.TagsProperty> 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.TagsProperty> 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.TagsProperty findByCompanyId_First(
101         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException,
103             com.liferay.portlet.tags.NoSuchPropertyException;
104 
105     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
106     public com.liferay.portlet.tags.model.TagsProperty findByCompanyId_Last(
107         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.SystemException,
109             com.liferay.portlet.tags.NoSuchPropertyException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portlet.tags.model.TagsProperty[] findByCompanyId_PrevAndNext(
113         long propertyId, long companyId,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.SystemException,
116             com.liferay.portlet.tags.NoSuchPropertyException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByEntryId(
120         long entryId) throws com.liferay.portal.SystemException;
121 
122     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
123     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByEntryId(
124         long entryId, int start, int end)
125         throws com.liferay.portal.SystemException;
126 
127     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
128     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByEntryId(
129         long entryId, int start, int end,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException;
132 
133     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134     public com.liferay.portlet.tags.model.TagsProperty findByEntryId_First(
135         long entryId, com.liferay.portal.kernel.util.OrderByComparator obc)
136         throws com.liferay.portal.SystemException,
137             com.liferay.portlet.tags.NoSuchPropertyException;
138 
139     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
140     public com.liferay.portlet.tags.model.TagsProperty findByEntryId_Last(
141         long entryId, com.liferay.portal.kernel.util.OrderByComparator obc)
142         throws com.liferay.portal.SystemException,
143             com.liferay.portlet.tags.NoSuchPropertyException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public com.liferay.portlet.tags.model.TagsProperty[] findByEntryId_PrevAndNext(
147         long propertyId, long entryId,
148         com.liferay.portal.kernel.util.OrderByComparator obc)
149         throws com.liferay.portal.SystemException,
150             com.liferay.portlet.tags.NoSuchPropertyException;
151 
152     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByC_K(
154         long companyId, java.lang.String key)
155         throws com.liferay.portal.SystemException;
156 
157     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
158     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByC_K(
159         long companyId, java.lang.String key, int start, int end)
160         throws com.liferay.portal.SystemException;
161 
162     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findByC_K(
164         long companyId, java.lang.String key, int start, int end,
165         com.liferay.portal.kernel.util.OrderByComparator obc)
166         throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public com.liferay.portlet.tags.model.TagsProperty findByC_K_First(
170         long companyId, java.lang.String key,
171         com.liferay.portal.kernel.util.OrderByComparator obc)
172         throws com.liferay.portal.SystemException,
173             com.liferay.portlet.tags.NoSuchPropertyException;
174 
175     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176     public com.liferay.portlet.tags.model.TagsProperty findByC_K_Last(
177         long companyId, java.lang.String key,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException,
180             com.liferay.portlet.tags.NoSuchPropertyException;
181 
182     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
183     public com.liferay.portlet.tags.model.TagsProperty[] findByC_K_PrevAndNext(
184         long propertyId, long companyId, java.lang.String key,
185         com.liferay.portal.kernel.util.OrderByComparator obc)
186         throws com.liferay.portal.SystemException,
187             com.liferay.portlet.tags.NoSuchPropertyException;
188 
189     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190     public com.liferay.portlet.tags.model.TagsProperty findByE_K(long entryId,
191         java.lang.String key)
192         throws com.liferay.portal.SystemException,
193             com.liferay.portlet.tags.NoSuchPropertyException;
194 
195     public com.liferay.portlet.tags.model.TagsProperty fetchByE_K(
196         long entryId, java.lang.String key)
197         throws com.liferay.portal.SystemException;
198 
199     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200     public java.util.List<Object> findWithDynamicQuery(
201         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
202         throws com.liferay.portal.SystemException;
203 
204     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205     public java.util.List<Object> findWithDynamicQuery(
206         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
207         int end) throws com.liferay.portal.SystemException;
208 
209     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll()
211         throws com.liferay.portal.SystemException;
212 
213     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll(
215         int start, int end) throws com.liferay.portal.SystemException;
216 
217     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218     public java.util.List<com.liferay.portlet.tags.model.TagsProperty> findAll(
219         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
220         throws com.liferay.portal.SystemException;
221 
222     public void removeByCompanyId(long companyId)
223         throws com.liferay.portal.SystemException;
224 
225     public void removeByEntryId(long entryId)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeByC_K(long companyId, java.lang.String key)
229         throws com.liferay.portal.SystemException;
230 
231     public void removeByE_K(long entryId, java.lang.String key)
232         throws com.liferay.portal.SystemException,
233             com.liferay.portlet.tags.NoSuchPropertyException;
234 
235     public void removeAll() throws com.liferay.portal.SystemException;
236 
237     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
238     public int countByCompanyId(long companyId)
239         throws com.liferay.portal.SystemException;
240 
241     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242     public int countByEntryId(long entryId)
243         throws com.liferay.portal.SystemException;
244 
245     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246     public int countByC_K(long companyId, java.lang.String key)
247         throws com.liferay.portal.SystemException;
248 
249     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250     public int countByE_K(long entryId, java.lang.String key)
251         throws com.liferay.portal.SystemException;
252 
253     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254     public int countAll() throws com.liferay.portal.SystemException;
255 }