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.portal.service.persistence;
24  
25  /**
26   * <a href="UserGroupPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface UserGroupPersistence extends BasePersistence {
32      public void cacheResult(com.liferay.portal.model.UserGroup userGroup);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portal.model.UserGroup> userGroups);
36  
37      public void clearCache();
38  
39      public com.liferay.portal.model.UserGroup create(long userGroupId);
40  
41      public com.liferay.portal.model.UserGroup remove(long userGroupId)
42          throws com.liferay.portal.NoSuchUserGroupException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.UserGroup remove(
46          com.liferay.portal.model.UserGroup userGroup)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(UserGroup userGroup, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.UserGroup update(
53          com.liferay.portal.model.UserGroup userGroup)
54          throws com.liferay.portal.SystemException;
55  
56      /**
57       * Add, update, or merge, the entity. This method also calls the model
58       * listeners to trigger the proper events associated with adding, deleting,
59       * or updating an entity.
60       *
61       * @param        userGroup the entity to add, update, or merge
62       * @param        merge boolean value for whether to merge the entity. The
63       *                default value is false. Setting merge to true is more
64       *                expensive and should only be true when userGroup is
65       *                transient. See LEP-5473 for a detailed discussion of this
66       *                method.
67       * @return        true if the portlet can be displayed via Ajax
68       */
69      public com.liferay.portal.model.UserGroup update(
70          com.liferay.portal.model.UserGroup userGroup, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.UserGroup updateImpl(
74          com.liferay.portal.model.UserGroup userGroup, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portal.model.UserGroup findByPrimaryKey(long userGroupId)
78          throws com.liferay.portal.NoSuchUserGroupException,
79              com.liferay.portal.SystemException;
80  
81      public com.liferay.portal.model.UserGroup fetchByPrimaryKey(
82          long userGroupId) throws com.liferay.portal.SystemException;
83  
84      public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
85          long companyId) throws com.liferay.portal.SystemException;
86  
87      public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
88          long companyId, int start, int end)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portal.model.UserGroup> findByCompanyId(
92          long companyId, int start, int end,
93          com.liferay.portal.kernel.util.OrderByComparator obc)
94          throws com.liferay.portal.SystemException;
95  
96      public com.liferay.portal.model.UserGroup findByCompanyId_First(
97          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
98          throws com.liferay.portal.NoSuchUserGroupException,
99              com.liferay.portal.SystemException;
100 
101     public com.liferay.portal.model.UserGroup findByCompanyId_Last(
102         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
103         throws com.liferay.portal.NoSuchUserGroupException,
104             com.liferay.portal.SystemException;
105 
106     public com.liferay.portal.model.UserGroup[] findByCompanyId_PrevAndNext(
107         long userGroupId, long companyId,
108         com.liferay.portal.kernel.util.OrderByComparator obc)
109         throws com.liferay.portal.NoSuchUserGroupException,
110             com.liferay.portal.SystemException;
111 
112     public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
113         long companyId, long parentUserGroupId)
114         throws com.liferay.portal.SystemException;
115 
116     public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
117         long companyId, long parentUserGroupId, int start, int end)
118         throws com.liferay.portal.SystemException;
119 
120     public java.util.List<com.liferay.portal.model.UserGroup> findByC_P(
121         long companyId, long parentUserGroupId, int start, int end,
122         com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException;
124 
125     public com.liferay.portal.model.UserGroup findByC_P_First(long companyId,
126         long parentUserGroupId,
127         com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.NoSuchUserGroupException,
129             com.liferay.portal.SystemException;
130 
131     public com.liferay.portal.model.UserGroup findByC_P_Last(long companyId,
132         long parentUserGroupId,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchUserGroupException,
135             com.liferay.portal.SystemException;
136 
137     public com.liferay.portal.model.UserGroup[] findByC_P_PrevAndNext(
138         long userGroupId, long companyId, long parentUserGroupId,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.NoSuchUserGroupException,
141             com.liferay.portal.SystemException;
142 
143     public com.liferay.portal.model.UserGroup findByC_N(long companyId,
144         java.lang.String name)
145         throws com.liferay.portal.NoSuchUserGroupException,
146             com.liferay.portal.SystemException;
147 
148     public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
149         java.lang.String name) throws com.liferay.portal.SystemException;
150 
151     public com.liferay.portal.model.UserGroup fetchByC_N(long companyId,
152         java.lang.String name, boolean retrieveFromCache)
153         throws com.liferay.portal.SystemException;
154 
155     public java.util.List<Object> findWithDynamicQuery(
156         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
157         throws com.liferay.portal.SystemException;
158 
159     public java.util.List<Object> findWithDynamicQuery(
160         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
161         int end) throws com.liferay.portal.SystemException;
162 
163     public java.util.List<com.liferay.portal.model.UserGroup> findAll()
164         throws com.liferay.portal.SystemException;
165 
166     public java.util.List<com.liferay.portal.model.UserGroup> findAll(
167         int start, int end) throws com.liferay.portal.SystemException;
168 
169     public java.util.List<com.liferay.portal.model.UserGroup> findAll(
170         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException;
172 
173     public void removeByCompanyId(long companyId)
174         throws com.liferay.portal.SystemException;
175 
176     public void removeByC_P(long companyId, long parentUserGroupId)
177         throws com.liferay.portal.SystemException;
178 
179     public void removeByC_N(long companyId, java.lang.String name)
180         throws com.liferay.portal.NoSuchUserGroupException,
181             com.liferay.portal.SystemException;
182 
183     public void removeAll() throws com.liferay.portal.SystemException;
184 
185     public int countByCompanyId(long companyId)
186         throws com.liferay.portal.SystemException;
187 
188     public int countByC_P(long companyId, long parentUserGroupId)
189         throws com.liferay.portal.SystemException;
190 
191     public int countByC_N(long companyId, java.lang.String name)
192         throws com.liferay.portal.SystemException;
193 
194     public int countAll() throws com.liferay.portal.SystemException;
195 
196     public java.util.List<com.liferay.portal.model.User> getUsers(long pk)
197         throws com.liferay.portal.SystemException;
198 
199     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
200         int start, int end) throws com.liferay.portal.SystemException;
201 
202     public java.util.List<com.liferay.portal.model.User> getUsers(long pk,
203         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
204         throws com.liferay.portal.SystemException;
205 
206     public int getUsersSize(long pk) throws com.liferay.portal.SystemException;
207 
208     public boolean containsUser(long pk, long userPK)
209         throws com.liferay.portal.SystemException;
210 
211     public boolean containsUsers(long pk)
212         throws com.liferay.portal.SystemException;
213 
214     public void addUser(long pk, long userPK)
215         throws com.liferay.portal.SystemException;
216 
217     public void addUser(long pk, com.liferay.portal.model.User user)
218         throws com.liferay.portal.SystemException;
219 
220     public void addUsers(long pk, long[] userPKs)
221         throws com.liferay.portal.SystemException;
222 
223     public void addUsers(long pk,
224         java.util.List<com.liferay.portal.model.User> users)
225         throws com.liferay.portal.SystemException;
226 
227     public void clearUsers(long pk) throws com.liferay.portal.SystemException;
228 
229     public void removeUser(long pk, long userPK)
230         throws com.liferay.portal.SystemException;
231 
232     public void removeUser(long pk, com.liferay.portal.model.User user)
233         throws com.liferay.portal.SystemException;
234 
235     public void removeUsers(long pk, long[] userPKs)
236         throws com.liferay.portal.SystemException;
237 
238     public void removeUsers(long pk,
239         java.util.List<com.liferay.portal.model.User> users)
240         throws com.liferay.portal.SystemException;
241 
242     public void setUsers(long pk, long[] userPKs)
243         throws com.liferay.portal.SystemException;
244 
245     public void setUsers(long pk,
246         java.util.List<com.liferay.portal.model.User> users)
247         throws com.liferay.portal.SystemException;
248 }