1   /**
2    * Copyright (c) 2000-2007 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="EmailAddressPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface EmailAddressPersistence {
32      public com.liferay.portal.model.EmailAddress create(long emailAddressId);
33  
34      public com.liferay.portal.model.EmailAddress remove(long emailAddressId)
35          throws com.liferay.portal.SystemException, 
36              com.liferay.portal.NoSuchEmailAddressException;
37  
38      public com.liferay.portal.model.EmailAddress remove(
39          com.liferay.portal.model.EmailAddress emailAddress)
40          throws com.liferay.portal.SystemException;
41  
42      public com.liferay.portal.model.EmailAddress update(
43          com.liferay.portal.model.EmailAddress emailAddress)
44          throws com.liferay.portal.SystemException;
45  
46      public com.liferay.portal.model.EmailAddress update(
47          com.liferay.portal.model.EmailAddress emailAddress, boolean merge)
48          throws com.liferay.portal.SystemException;
49  
50      public com.liferay.portal.model.EmailAddress findByPrimaryKey(
51          long emailAddressId)
52          throws com.liferay.portal.SystemException, 
53              com.liferay.portal.NoSuchEmailAddressException;
54  
55      public com.liferay.portal.model.EmailAddress fetchByPrimaryKey(
56          long emailAddressId) throws com.liferay.portal.SystemException;
57  
58      public java.util.List findByCompanyId(long companyId)
59          throws com.liferay.portal.SystemException;
60  
61      public java.util.List findByCompanyId(long companyId, int begin, int end)
62          throws com.liferay.portal.SystemException;
63  
64      public java.util.List findByCompanyId(long companyId, int begin, int end,
65          com.liferay.portal.kernel.util.OrderByComparator obc)
66          throws com.liferay.portal.SystemException;
67  
68      public com.liferay.portal.model.EmailAddress findByCompanyId_First(
69          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
70          throws com.liferay.portal.SystemException, 
71              com.liferay.portal.NoSuchEmailAddressException;
72  
73      public com.liferay.portal.model.EmailAddress findByCompanyId_Last(
74          long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
75          throws com.liferay.portal.SystemException, 
76              com.liferay.portal.NoSuchEmailAddressException;
77  
78      public com.liferay.portal.model.EmailAddress[] findByCompanyId_PrevAndNext(
79          long emailAddressId, long companyId,
80          com.liferay.portal.kernel.util.OrderByComparator obc)
81          throws com.liferay.portal.SystemException, 
82              com.liferay.portal.NoSuchEmailAddressException;
83  
84      public java.util.List findByUserId(long userId)
85          throws com.liferay.portal.SystemException;
86  
87      public java.util.List findByUserId(long userId, int begin, int end)
88          throws com.liferay.portal.SystemException;
89  
90      public java.util.List findByUserId(long userId, int begin, int end,
91          com.liferay.portal.kernel.util.OrderByComparator obc)
92          throws com.liferay.portal.SystemException;
93  
94      public com.liferay.portal.model.EmailAddress findByUserId_First(
95          long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
96          throws com.liferay.portal.SystemException, 
97              com.liferay.portal.NoSuchEmailAddressException;
98  
99      public com.liferay.portal.model.EmailAddress findByUserId_Last(
100         long userId, com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException, 
102             com.liferay.portal.NoSuchEmailAddressException;
103 
104     public com.liferay.portal.model.EmailAddress[] findByUserId_PrevAndNext(
105         long emailAddressId, long userId,
106         com.liferay.portal.kernel.util.OrderByComparator obc)
107         throws com.liferay.portal.SystemException, 
108             com.liferay.portal.NoSuchEmailAddressException;
109 
110     public java.util.List findByC_C(long companyId, long classNameId)
111         throws com.liferay.portal.SystemException;
112 
113     public java.util.List findByC_C(long companyId, long classNameId,
114         int begin, int end) throws com.liferay.portal.SystemException;
115 
116     public java.util.List findByC_C(long companyId, long classNameId,
117         int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
118         throws com.liferay.portal.SystemException;
119 
120     public com.liferay.portal.model.EmailAddress findByC_C_First(
121         long companyId, long classNameId,
122         com.liferay.portal.kernel.util.OrderByComparator obc)
123         throws com.liferay.portal.SystemException, 
124             com.liferay.portal.NoSuchEmailAddressException;
125 
126     public com.liferay.portal.model.EmailAddress findByC_C_Last(
127         long companyId, long classNameId,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException, 
130             com.liferay.portal.NoSuchEmailAddressException;
131 
132     public com.liferay.portal.model.EmailAddress[] findByC_C_PrevAndNext(
133         long emailAddressId, long companyId, long classNameId,
134         com.liferay.portal.kernel.util.OrderByComparator obc)
135         throws com.liferay.portal.SystemException, 
136             com.liferay.portal.NoSuchEmailAddressException;
137 
138     public java.util.List findByC_C_C(long companyId, long classNameId,
139         long classPK) throws com.liferay.portal.SystemException;
140 
141     public java.util.List findByC_C_C(long companyId, long classNameId,
142         long classPK, int begin, int end)
143         throws com.liferay.portal.SystemException;
144 
145     public java.util.List findByC_C_C(long companyId, long classNameId,
146         long classPK, int begin, int end,
147         com.liferay.portal.kernel.util.OrderByComparator obc)
148         throws com.liferay.portal.SystemException;
149 
150     public com.liferay.portal.model.EmailAddress findByC_C_C_First(
151         long companyId, long classNameId, long classPK,
152         com.liferay.portal.kernel.util.OrderByComparator obc)
153         throws com.liferay.portal.SystemException, 
154             com.liferay.portal.NoSuchEmailAddressException;
155 
156     public com.liferay.portal.model.EmailAddress findByC_C_C_Last(
157         long companyId, long classNameId, long classPK,
158         com.liferay.portal.kernel.util.OrderByComparator obc)
159         throws com.liferay.portal.SystemException, 
160             com.liferay.portal.NoSuchEmailAddressException;
161 
162     public com.liferay.portal.model.EmailAddress[] findByC_C_C_PrevAndNext(
163         long emailAddressId, long companyId, long classNameId, long classPK,
164         com.liferay.portal.kernel.util.OrderByComparator obc)
165         throws com.liferay.portal.SystemException, 
166             com.liferay.portal.NoSuchEmailAddressException;
167 
168     public java.util.List findByC_C_C_P(long companyId, long classNameId,
169         long classPK, boolean primary)
170         throws com.liferay.portal.SystemException;
171 
172     public java.util.List findByC_C_C_P(long companyId, long classNameId,
173         long classPK, boolean primary, int begin, int end)
174         throws com.liferay.portal.SystemException;
175 
176     public java.util.List findByC_C_C_P(long companyId, long classNameId,
177         long classPK, boolean primary, int begin, int end,
178         com.liferay.portal.kernel.util.OrderByComparator obc)
179         throws com.liferay.portal.SystemException;
180 
181     public com.liferay.portal.model.EmailAddress findByC_C_C_P_First(
182         long companyId, long classNameId, long classPK, boolean primary,
183         com.liferay.portal.kernel.util.OrderByComparator obc)
184         throws com.liferay.portal.SystemException, 
185             com.liferay.portal.NoSuchEmailAddressException;
186 
187     public com.liferay.portal.model.EmailAddress findByC_C_C_P_Last(
188         long companyId, long classNameId, long classPK, boolean primary,
189         com.liferay.portal.kernel.util.OrderByComparator obc)
190         throws com.liferay.portal.SystemException, 
191             com.liferay.portal.NoSuchEmailAddressException;
192 
193     public com.liferay.portal.model.EmailAddress[] findByC_C_C_P_PrevAndNext(
194         long emailAddressId, long companyId, long classNameId, long classPK,
195         boolean primary, com.liferay.portal.kernel.util.OrderByComparator obc)
196         throws com.liferay.portal.SystemException, 
197             com.liferay.portal.NoSuchEmailAddressException;
198 
199     public java.util.List findWithDynamicQuery(
200         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
201         throws com.liferay.portal.SystemException;
202 
203     public java.util.List findWithDynamicQuery(
204         com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
205         int begin, int end) throws com.liferay.portal.SystemException;
206 
207     public java.util.List findAll() throws com.liferay.portal.SystemException;
208 
209     public java.util.List findAll(int begin, int end)
210         throws com.liferay.portal.SystemException;
211 
212     public java.util.List findAll(int begin, int end,
213         com.liferay.portal.kernel.util.OrderByComparator obc)
214         throws com.liferay.portal.SystemException;
215 
216     public void removeByCompanyId(long companyId)
217         throws com.liferay.portal.SystemException;
218 
219     public void removeByUserId(long userId)
220         throws com.liferay.portal.SystemException;
221 
222     public void removeByC_C(long companyId, long classNameId)
223         throws com.liferay.portal.SystemException;
224 
225     public void removeByC_C_C(long companyId, long classNameId, long classPK)
226         throws com.liferay.portal.SystemException;
227 
228     public void removeByC_C_C_P(long companyId, long classNameId, long classPK,
229         boolean primary) throws com.liferay.portal.SystemException;
230 
231     public void removeAll() throws com.liferay.portal.SystemException;
232 
233     public int countByCompanyId(long companyId)
234         throws com.liferay.portal.SystemException;
235 
236     public int countByUserId(long userId)
237         throws com.liferay.portal.SystemException;
238 
239     public int countByC_C(long companyId, long classNameId)
240         throws com.liferay.portal.SystemException;
241 
242     public int countByC_C_C(long companyId, long classNameId, long classPK)
243         throws com.liferay.portal.SystemException;
244 
245     public int countByC_C_C_P(long companyId, long classNameId, long classPK,
246         boolean primary) throws com.liferay.portal.SystemException;
247 
248     public int countAll() throws com.liferay.portal.SystemException;
249 }