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="TagsVocabularyPersistence.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public interface TagsVocabularyPersistence extends BasePersistence {
34      public void cacheResult(
35          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary);
36  
37      public void cacheResult(
38          java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> tagsVocabularies);
39  
40      public void clearCache();
41  
42      public com.liferay.portlet.tags.model.TagsVocabulary create(
43          long vocabularyId);
44  
45      public com.liferay.portlet.tags.model.TagsVocabulary remove(
46          long vocabularyId)
47          throws com.liferay.portal.SystemException,
48              com.liferay.portlet.tags.NoSuchVocabularyException;
49  
50      public com.liferay.portlet.tags.model.TagsVocabulary remove(
51          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
52          throws com.liferay.portal.SystemException;
53  
54      /**
55       * @deprecated Use <code>update(TagsVocabulary tagsVocabulary, boolean merge)</code>.
56       */
57      public com.liferay.portlet.tags.model.TagsVocabulary update(
58          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary)
59          throws com.liferay.portal.SystemException;
60  
61      /**
62       * Add, update, or merge, the entity. This method also calls the model
63       * listeners to trigger the proper events associated with adding, deleting,
64       * or updating an entity.
65       *
66       * @param        tagsVocabulary the entity to add, update, or merge
67       * @param        merge boolean value for whether to merge the entity. The
68       *                default value is false. Setting merge to true is more
69       *                expensive and should only be true when tagsVocabulary is
70       *                transient. See LEP-5473 for a detailed discussion of this
71       *                method.
72       * @return        true if the portlet can be displayed via Ajax
73       */
74      public com.liferay.portlet.tags.model.TagsVocabulary update(
75          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary,
76          boolean merge) throws com.liferay.portal.SystemException;
77  
78      public com.liferay.portlet.tags.model.TagsVocabulary updateImpl(
79          com.liferay.portlet.tags.model.TagsVocabulary tagsVocabulary,
80          boolean merge) throws com.liferay.portal.SystemException;
81  
82      public com.liferay.portlet.tags.model.TagsVocabulary findByPrimaryKey(
83          long vocabularyId)
84          throws com.liferay.portal.SystemException,
85              com.liferay.portlet.tags.NoSuchVocabularyException;
86  
87      public com.liferay.portlet.tags.model.TagsVocabulary fetchByPrimaryKey(
88          long vocabularyId) throws com.liferay.portal.SystemException;
89  
90      public com.liferay.portlet.tags.model.TagsVocabulary findByG_N(
91          long groupId, java.lang.String name)
92          throws com.liferay.portal.SystemException,
93              com.liferay.portlet.tags.NoSuchVocabularyException;
94  
95      public com.liferay.portlet.tags.model.TagsVocabulary fetchByG_N(
96          long groupId, java.lang.String name)
97          throws com.liferay.portal.SystemException;
98  
99      public com.liferay.portlet.tags.model.TagsVocabulary fetchByG_N(
100         long groupId, java.lang.String name, boolean retrieveFromCache)
101         throws com.liferay.portal.SystemException;
102 
103     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByG_F(
104         long groupId, boolean folksonomy)
105         throws com.liferay.portal.SystemException;
106 
107     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByG_F(
108         long groupId, boolean folksonomy, int start, int end)
109         throws com.liferay.portal.SystemException;
110 
111     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByG_F(
112         long groupId, boolean folksonomy, int start, int end,
113         com.liferay.portal.kernel.util.OrderByComparator obc)
114         throws com.liferay.portal.SystemException;
115 
116     public com.liferay.portlet.tags.model.TagsVocabulary findByG_F_First(
117         long groupId, boolean folksonomy,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException,
120             com.liferay.portlet.tags.NoSuchVocabularyException;
121 
122     public com.liferay.portlet.tags.model.TagsVocabulary findByG_F_Last(
123         long groupId, boolean folksonomy,
124         com.liferay.portal.kernel.util.OrderByComparator obc)
125         throws com.liferay.portal.SystemException,
126             com.liferay.portlet.tags.NoSuchVocabularyException;
127 
128     public com.liferay.portlet.tags.model.TagsVocabulary[] findByG_F_PrevAndNext(
129         long vocabularyId, long groupId, boolean folksonomy,
130         com.liferay.portal.kernel.util.OrderByComparator obc)
131         throws com.liferay.portal.SystemException,
132             com.liferay.portlet.tags.NoSuchVocabularyException;
133 
134     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByC_F(
135         long companyId, boolean folksonomy)
136         throws com.liferay.portal.SystemException;
137 
138     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByC_F(
139         long companyId, boolean folksonomy, int start, int end)
140         throws com.liferay.portal.SystemException;
141 
142     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findByC_F(
143         long companyId, boolean folksonomy, int start, int end,
144         com.liferay.portal.kernel.util.OrderByComparator obc)
145         throws com.liferay.portal.SystemException;
146 
147     public com.liferay.portlet.tags.model.TagsVocabulary findByC_F_First(
148         long companyId, boolean folksonomy,
149         com.liferay.portal.kernel.util.OrderByComparator obc)
150         throws com.liferay.portal.SystemException,
151             com.liferay.portlet.tags.NoSuchVocabularyException;
152 
153     public com.liferay.portlet.tags.model.TagsVocabulary findByC_F_Last(
154         long companyId, boolean folksonomy,
155         com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException,
157             com.liferay.portlet.tags.NoSuchVocabularyException;
158 
159     public com.liferay.portlet.tags.model.TagsVocabulary[] findByC_F_PrevAndNext(
160         long vocabularyId, long companyId, boolean folksonomy,
161         com.liferay.portal.kernel.util.OrderByComparator obc)
162         throws com.liferay.portal.SystemException,
163             com.liferay.portlet.tags.NoSuchVocabularyException;
164 
165     public java.util.List<Object> findWithDynamicQuery(
166         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
167         throws com.liferay.portal.SystemException;
168 
169     public java.util.List<Object> findWithDynamicQuery(
170         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
171         int end) throws com.liferay.portal.SystemException;
172 
173     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findAll()
174         throws com.liferay.portal.SystemException;
175 
176     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findAll(
177         int start, int end) throws com.liferay.portal.SystemException;
178 
179     public java.util.List<com.liferay.portlet.tags.model.TagsVocabulary> findAll(
180         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
181         throws com.liferay.portal.SystemException;
182 
183     public void removeByG_N(long groupId, java.lang.String name)
184         throws com.liferay.portal.SystemException,
185             com.liferay.portlet.tags.NoSuchVocabularyException;
186 
187     public void removeByG_F(long groupId, boolean folksonomy)
188         throws com.liferay.portal.SystemException;
189 
190     public void removeByC_F(long companyId, boolean folksonomy)
191         throws com.liferay.portal.SystemException;
192 
193     public void removeAll() throws com.liferay.portal.SystemException;
194 
195     public int countByG_N(long groupId, java.lang.String name)
196         throws com.liferay.portal.SystemException;
197 
198     public int countByG_F(long groupId, boolean folksonomy)
199         throws com.liferay.portal.SystemException;
200 
201     public int countByC_F(long companyId, boolean folksonomy)
202         throws com.liferay.portal.SystemException;
203 
204     public int countAll() throws com.liferay.portal.SystemException;
205 }