1   /**
2    * Copyright (c) 2000-2008 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="OrgGroupRolePersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface OrgGroupRolePersistence {
32      public com.liferay.portal.model.OrgGroupRole create(
33          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK);
34  
35      public com.liferay.portal.model.OrgGroupRole remove(
36          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
37          throws com.liferay.portal.SystemException,
38              com.liferay.portal.NoSuchOrgGroupRoleException;
39  
40      public com.liferay.portal.model.OrgGroupRole remove(
41          com.liferay.portal.model.OrgGroupRole orgGroupRole)
42          throws com.liferay.portal.SystemException;
43  
44      /**
45       * @deprecated Use <code>update(OrgGroupRole orgGroupRole, boolean merge)</code>.
46       */
47      public com.liferay.portal.model.OrgGroupRole update(
48          com.liferay.portal.model.OrgGroupRole orgGroupRole)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * Add, update, or merge, the entity. This method also calls the model
53       * listeners to trigger the proper events associated with adding, deleting,
54       * or updating an entity.
55       *
56       * @param        orgGroupRole the entity to add, update, or merge
57       * @param        merge boolean value for whether to merge the entity. The
58       *                default value is false. Setting merge to true is more
59       *                expensive and should only be true when orgGroupRole is
60       *                transient. See LEP-5473 for a detailed discussion of this
61       *                method.
62       * @return        true if the portlet can be displayed via Ajax
63       */
64      public com.liferay.portal.model.OrgGroupRole update(
65          com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
66          throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portal.model.OrgGroupRole updateImpl(
69          com.liferay.portal.model.OrgGroupRole orgGroupRole, boolean merge)
70          throws com.liferay.portal.SystemException;
71  
72      public com.liferay.portal.model.OrgGroupRole findByPrimaryKey(
73          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
74          throws com.liferay.portal.SystemException,
75              com.liferay.portal.NoSuchOrgGroupRoleException;
76  
77      public com.liferay.portal.model.OrgGroupRole fetchByPrimaryKey(
78          com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK)
79          throws com.liferay.portal.SystemException;
80  
81      public java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
82          long groupId) throws com.liferay.portal.SystemException;
83  
84      public java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
85          long groupId, int begin, int end)
86          throws com.liferay.portal.SystemException;
87  
88      public java.util.List<com.liferay.portal.model.OrgGroupRole> findByGroupId(
89          long groupId, int begin, int end,
90          com.liferay.portal.kernel.util.OrderByComparator obc)
91          throws com.liferay.portal.SystemException;
92  
93      public com.liferay.portal.model.OrgGroupRole findByGroupId_First(
94          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
95          throws com.liferay.portal.SystemException,
96              com.liferay.portal.NoSuchOrgGroupRoleException;
97  
98      public com.liferay.portal.model.OrgGroupRole findByGroupId_Last(
99          long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
100         throws com.liferay.portal.SystemException,
101             com.liferay.portal.NoSuchOrgGroupRoleException;
102 
103     public com.liferay.portal.model.OrgGroupRole[] findByGroupId_PrevAndNext(
104         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
105         long groupId, com.liferay.portal.kernel.util.OrderByComparator obc)
106         throws com.liferay.portal.SystemException,
107             com.liferay.portal.NoSuchOrgGroupRoleException;
108 
109     public java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
110         long roleId) throws com.liferay.portal.SystemException;
111 
112     public java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
113         long roleId, int begin, int end)
114         throws com.liferay.portal.SystemException;
115 
116     public java.util.List<com.liferay.portal.model.OrgGroupRole> findByRoleId(
117         long roleId, int begin, int end,
118         com.liferay.portal.kernel.util.OrderByComparator obc)
119         throws com.liferay.portal.SystemException;
120 
121     public com.liferay.portal.model.OrgGroupRole findByRoleId_First(
122         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException,
124             com.liferay.portal.NoSuchOrgGroupRoleException;
125 
126     public com.liferay.portal.model.OrgGroupRole findByRoleId_Last(
127         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
128         throws com.liferay.portal.SystemException,
129             com.liferay.portal.NoSuchOrgGroupRoleException;
130 
131     public com.liferay.portal.model.OrgGroupRole[] findByRoleId_PrevAndNext(
132         com.liferay.portal.service.persistence.OrgGroupRolePK orgGroupRolePK,
133         long roleId, com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.SystemException,
135             com.liferay.portal.NoSuchOrgGroupRoleException;
136 
137     public java.util.List<com.liferay.portal.model.OrgGroupRole> findWithDynamicQuery(
138         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
139         throws com.liferay.portal.SystemException;
140 
141     public java.util.List<com.liferay.portal.model.OrgGroupRole> findWithDynamicQuery(
142         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
143         int begin, int end) throws com.liferay.portal.SystemException;
144 
145     public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll()
146         throws com.liferay.portal.SystemException;
147 
148     public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
149         int begin, int end) throws com.liferay.portal.SystemException;
150 
151     public java.util.List<com.liferay.portal.model.OrgGroupRole> findAll(
152         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException;
154 
155     public void removeByGroupId(long groupId)
156         throws com.liferay.portal.SystemException;
157 
158     public void removeByRoleId(long roleId)
159         throws com.liferay.portal.SystemException;
160 
161     public void removeAll() throws com.liferay.portal.SystemException;
162 
163     public int countByGroupId(long groupId)
164         throws com.liferay.portal.SystemException;
165 
166     public int countByRoleId(long roleId)
167         throws com.liferay.portal.SystemException;
168 
169     public int countAll() throws com.liferay.portal.SystemException;
170 }