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