001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.service.persistence;
016    
017    import com.liferay.portal.model.Company;
018    
019    /**
020     * The persistence interface for the company service.
021     *
022     * <p>
023     * Never modify or reference this interface directly. Always use {@link CompanyUtil} to access the company persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
024     * </p>
025     *
026     * <p>
027     * Caching information and settings can be found in <code>portal.properties</code>
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see CompanyPersistenceImpl
032     * @see CompanyUtil
033     * @generated
034     */
035    public interface CompanyPersistence extends BasePersistence<Company> {
036            /**
037            * Caches the company in the entity cache if it is enabled.
038            *
039            * @param company the company to cache
040            */
041            public void cacheResult(com.liferay.portal.model.Company company);
042    
043            /**
044            * Caches the companies in the entity cache if it is enabled.
045            *
046            * @param companies the companies to cache
047            */
048            public void cacheResult(
049                    java.util.List<com.liferay.portal.model.Company> companies);
050    
051            /**
052            * Creates a new company with the primary key. Does not add the company to the database.
053            *
054            * @param companyId the primary key for the new company
055            * @return the new company
056            */
057            public com.liferay.portal.model.Company create(long companyId);
058    
059            /**
060            * Removes the company with the primary key from the database. Also notifies the appropriate model listeners.
061            *
062            * @param companyId the primary key of the company to remove
063            * @return the company that was removed
064            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
065            * @throws SystemException if a system exception occurred
066            */
067            public com.liferay.portal.model.Company remove(long companyId)
068                    throws com.liferay.portal.NoSuchCompanyException,
069                            com.liferay.portal.kernel.exception.SystemException;
070    
071            public com.liferay.portal.model.Company updateImpl(
072                    com.liferay.portal.model.Company company, boolean merge)
073                    throws com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Finds the company with the primary key or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
077            *
078            * @param companyId the primary key of the company to find
079            * @return the company
080            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
081            * @throws SystemException if a system exception occurred
082            */
083            public com.liferay.portal.model.Company findByPrimaryKey(long companyId)
084                    throws com.liferay.portal.NoSuchCompanyException,
085                            com.liferay.portal.kernel.exception.SystemException;
086    
087            /**
088            * Finds the company with the primary key or returns <code>null</code> if it could not be found.
089            *
090            * @param companyId the primary key of the company to find
091            * @return the company, or <code>null</code> if a company with the primary key could not be found
092            * @throws SystemException if a system exception occurred
093            */
094            public com.liferay.portal.model.Company fetchByPrimaryKey(long companyId)
095                    throws com.liferay.portal.kernel.exception.SystemException;
096    
097            /**
098            * Finds the company where webId = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
099            *
100            * @param webId the web id to search with
101            * @return the matching company
102            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
103            * @throws SystemException if a system exception occurred
104            */
105            public com.liferay.portal.model.Company findByWebId(java.lang.String webId)
106                    throws com.liferay.portal.NoSuchCompanyException,
107                            com.liferay.portal.kernel.exception.SystemException;
108    
109            /**
110            * Finds the company where webId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
111            *
112            * @param webId the web id to search with
113            * @return the matching company, or <code>null</code> if a matching company could not be found
114            * @throws SystemException if a system exception occurred
115            */
116            public com.liferay.portal.model.Company fetchByWebId(java.lang.String webId)
117                    throws com.liferay.portal.kernel.exception.SystemException;
118    
119            /**
120            * Finds the company where webId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
121            *
122            * @param webId the web id to search with
123            * @return the matching company, or <code>null</code> if a matching company could not be found
124            * @throws SystemException if a system exception occurred
125            */
126            public com.liferay.portal.model.Company fetchByWebId(
127                    java.lang.String webId, boolean retrieveFromCache)
128                    throws com.liferay.portal.kernel.exception.SystemException;
129    
130            /**
131            * Finds the company where virtualHost = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
132            *
133            * @param virtualHost the virtual host to search with
134            * @return the matching company
135            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
136            * @throws SystemException if a system exception occurred
137            */
138            public com.liferay.portal.model.Company findByVirtualHost(
139                    java.lang.String virtualHost)
140                    throws com.liferay.portal.NoSuchCompanyException,
141                            com.liferay.portal.kernel.exception.SystemException;
142    
143            /**
144            * Finds the company where virtualHost = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
145            *
146            * @param virtualHost the virtual host to search with
147            * @return the matching company, or <code>null</code> if a matching company could not be found
148            * @throws SystemException if a system exception occurred
149            */
150            public com.liferay.portal.model.Company fetchByVirtualHost(
151                    java.lang.String virtualHost)
152                    throws com.liferay.portal.kernel.exception.SystemException;
153    
154            /**
155            * Finds the company where virtualHost = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
156            *
157            * @param virtualHost the virtual host to search with
158            * @return the matching company, or <code>null</code> if a matching company could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            public com.liferay.portal.model.Company fetchByVirtualHost(
162                    java.lang.String virtualHost, boolean retrieveFromCache)
163                    throws com.liferay.portal.kernel.exception.SystemException;
164    
165            /**
166            * Finds the company where mx = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
167            *
168            * @param mx the mx to search with
169            * @return the matching company
170            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
171            * @throws SystemException if a system exception occurred
172            */
173            public com.liferay.portal.model.Company findByMx(java.lang.String mx)
174                    throws com.liferay.portal.NoSuchCompanyException,
175                            com.liferay.portal.kernel.exception.SystemException;
176    
177            /**
178            * Finds the company where mx = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
179            *
180            * @param mx the mx to search with
181            * @return the matching company, or <code>null</code> if a matching company could not be found
182            * @throws SystemException if a system exception occurred
183            */
184            public com.liferay.portal.model.Company fetchByMx(java.lang.String mx)
185                    throws com.liferay.portal.kernel.exception.SystemException;
186    
187            /**
188            * Finds the company where mx = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
189            *
190            * @param mx the mx to search with
191            * @return the matching company, or <code>null</code> if a matching company could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            public com.liferay.portal.model.Company fetchByMx(java.lang.String mx,
195                    boolean retrieveFromCache)
196                    throws com.liferay.portal.kernel.exception.SystemException;
197    
198            /**
199            * Finds the company where logoId = &#63; or throws a {@link com.liferay.portal.NoSuchCompanyException} if it could not be found.
200            *
201            * @param logoId the logo id to search with
202            * @return the matching company
203            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
204            * @throws SystemException if a system exception occurred
205            */
206            public com.liferay.portal.model.Company findByLogoId(long logoId)
207                    throws com.liferay.portal.NoSuchCompanyException,
208                            com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Finds the company where logoId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
212            *
213            * @param logoId the logo id to search with
214            * @return the matching company, or <code>null</code> if a matching company could not be found
215            * @throws SystemException if a system exception occurred
216            */
217            public com.liferay.portal.model.Company fetchByLogoId(long logoId)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Finds the company where logoId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
222            *
223            * @param logoId the logo id to search with
224            * @return the matching company, or <code>null</code> if a matching company could not be found
225            * @throws SystemException if a system exception occurred
226            */
227            public com.liferay.portal.model.Company fetchByLogoId(long logoId,
228                    boolean retrieveFromCache)
229                    throws com.liferay.portal.kernel.exception.SystemException;
230    
231            /**
232            * Finds all the companies where system = &#63;.
233            *
234            * @param system the system to search with
235            * @return the matching companies
236            * @throws SystemException if a system exception occurred
237            */
238            public java.util.List<com.liferay.portal.model.Company> findBySystem(
239                    boolean system)
240                    throws com.liferay.portal.kernel.exception.SystemException;
241    
242            /**
243            * Finds a range of all the companies where system = &#63;.
244            *
245            * <p>
246            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
247            * </p>
248            *
249            * @param system the system to search with
250            * @param start the lower bound of the range of companies to return
251            * @param end the upper bound of the range of companies to return (not inclusive)
252            * @return the range of matching companies
253            * @throws SystemException if a system exception occurred
254            */
255            public java.util.List<com.liferay.portal.model.Company> findBySystem(
256                    boolean system, int start, int end)
257                    throws com.liferay.portal.kernel.exception.SystemException;
258    
259            /**
260            * Finds an ordered range of all the companies where system = &#63;.
261            *
262            * <p>
263            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
264            * </p>
265            *
266            * @param system the system to search with
267            * @param start the lower bound of the range of companies to return
268            * @param end the upper bound of the range of companies to return (not inclusive)
269            * @param orderByComparator the comparator to order the results by
270            * @return the ordered range of matching companies
271            * @throws SystemException if a system exception occurred
272            */
273            public java.util.List<com.liferay.portal.model.Company> findBySystem(
274                    boolean system, int start, int end,
275                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
276                    throws com.liferay.portal.kernel.exception.SystemException;
277    
278            /**
279            * Finds the first company in the ordered set where system = &#63;.
280            *
281            * <p>
282            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
283            * </p>
284            *
285            * @param system the system to search with
286            * @param orderByComparator the comparator to order the set by
287            * @return the first matching company
288            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
289            * @throws SystemException if a system exception occurred
290            */
291            public com.liferay.portal.model.Company findBySystem_First(boolean system,
292                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
293                    throws com.liferay.portal.NoSuchCompanyException,
294                            com.liferay.portal.kernel.exception.SystemException;
295    
296            /**
297            * Finds the last company in the ordered set where system = &#63;.
298            *
299            * <p>
300            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
301            * </p>
302            *
303            * @param system the system to search with
304            * @param orderByComparator the comparator to order the set by
305            * @return the last matching company
306            * @throws com.liferay.portal.NoSuchCompanyException if a matching company could not be found
307            * @throws SystemException if a system exception occurred
308            */
309            public com.liferay.portal.model.Company findBySystem_Last(boolean system,
310                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
311                    throws com.liferay.portal.NoSuchCompanyException,
312                            com.liferay.portal.kernel.exception.SystemException;
313    
314            /**
315            * Finds the companies before and after the current company in the ordered set where system = &#63;.
316            *
317            * <p>
318            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
319            * </p>
320            *
321            * @param companyId the primary key of the current company
322            * @param system the system to search with
323            * @param orderByComparator the comparator to order the set by
324            * @return the previous, current, and next company
325            * @throws com.liferay.portal.NoSuchCompanyException if a company with the primary key could not be found
326            * @throws SystemException if a system exception occurred
327            */
328            public com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
329                    long companyId, boolean system,
330                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
331                    throws com.liferay.portal.NoSuchCompanyException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            /**
335            * Finds all the companies.
336            *
337            * @return the companies
338            * @throws SystemException if a system exception occurred
339            */
340            public java.util.List<com.liferay.portal.model.Company> findAll()
341                    throws com.liferay.portal.kernel.exception.SystemException;
342    
343            /**
344            * Finds a range of all the companies.
345            *
346            * <p>
347            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
348            * </p>
349            *
350            * @param start the lower bound of the range of companies to return
351            * @param end the upper bound of the range of companies to return (not inclusive)
352            * @return the range of companies
353            * @throws SystemException if a system exception occurred
354            */
355            public java.util.List<com.liferay.portal.model.Company> findAll(int start,
356                    int end) throws com.liferay.portal.kernel.exception.SystemException;
357    
358            /**
359            * Finds an ordered range of all the companies.
360            *
361            * <p>
362            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
363            * </p>
364            *
365            * @param start the lower bound of the range of companies to return
366            * @param end the upper bound of the range of companies to return (not inclusive)
367            * @param orderByComparator the comparator to order the results by
368            * @return the ordered range of companies
369            * @throws SystemException if a system exception occurred
370            */
371            public java.util.List<com.liferay.portal.model.Company> findAll(int start,
372                    int end,
373                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
374                    throws com.liferay.portal.kernel.exception.SystemException;
375    
376            /**
377            * Removes the company where webId = &#63; from the database.
378            *
379            * @param webId the web id to search with
380            * @throws SystemException if a system exception occurred
381            */
382            public void removeByWebId(java.lang.String webId)
383                    throws com.liferay.portal.NoSuchCompanyException,
384                            com.liferay.portal.kernel.exception.SystemException;
385    
386            /**
387            * Removes the company where virtualHost = &#63; from the database.
388            *
389            * @param virtualHost the virtual host to search with
390            * @throws SystemException if a system exception occurred
391            */
392            public void removeByVirtualHost(java.lang.String virtualHost)
393                    throws com.liferay.portal.NoSuchCompanyException,
394                            com.liferay.portal.kernel.exception.SystemException;
395    
396            /**
397            * Removes the company where mx = &#63; from the database.
398            *
399            * @param mx the mx to search with
400            * @throws SystemException if a system exception occurred
401            */
402            public void removeByMx(java.lang.String mx)
403                    throws com.liferay.portal.NoSuchCompanyException,
404                            com.liferay.portal.kernel.exception.SystemException;
405    
406            /**
407            * Removes the company where logoId = &#63; from the database.
408            *
409            * @param logoId the logo id to search with
410            * @throws SystemException if a system exception occurred
411            */
412            public void removeByLogoId(long logoId)
413                    throws com.liferay.portal.NoSuchCompanyException,
414                            com.liferay.portal.kernel.exception.SystemException;
415    
416            /**
417            * Removes all the companies where system = &#63; from the database.
418            *
419            * @param system the system to search with
420            * @throws SystemException if a system exception occurred
421            */
422            public void removeBySystem(boolean system)
423                    throws com.liferay.portal.kernel.exception.SystemException;
424    
425            /**
426            * Removes all the companies from the database.
427            *
428            * @throws SystemException if a system exception occurred
429            */
430            public void removeAll()
431                    throws com.liferay.portal.kernel.exception.SystemException;
432    
433            /**
434            * Counts all the companies where webId = &#63;.
435            *
436            * @param webId the web id to search with
437            * @return the number of matching companies
438            * @throws SystemException if a system exception occurred
439            */
440            public int countByWebId(java.lang.String webId)
441                    throws com.liferay.portal.kernel.exception.SystemException;
442    
443            /**
444            * Counts all the companies where virtualHost = &#63;.
445            *
446            * @param virtualHost the virtual host to search with
447            * @return the number of matching companies
448            * @throws SystemException if a system exception occurred
449            */
450            public int countByVirtualHost(java.lang.String virtualHost)
451                    throws com.liferay.portal.kernel.exception.SystemException;
452    
453            /**
454            * Counts all the companies where mx = &#63;.
455            *
456            * @param mx the mx to search with
457            * @return the number of matching companies
458            * @throws SystemException if a system exception occurred
459            */
460            public int countByMx(java.lang.String mx)
461                    throws com.liferay.portal.kernel.exception.SystemException;
462    
463            /**
464            * Counts all the companies where logoId = &#63;.
465            *
466            * @param logoId the logo id to search with
467            * @return the number of matching companies
468            * @throws SystemException if a system exception occurred
469            */
470            public int countByLogoId(long logoId)
471                    throws com.liferay.portal.kernel.exception.SystemException;
472    
473            /**
474            * Counts all the companies where system = &#63;.
475            *
476            * @param system the system to search with
477            * @return the number of matching companies
478            * @throws SystemException if a system exception occurred
479            */
480            public int countBySystem(boolean system)
481                    throws com.liferay.portal.kernel.exception.SystemException;
482    
483            /**
484            * Counts all the companies.
485            *
486            * @return the number of companies
487            * @throws SystemException if a system exception occurred
488            */
489            public int countAll()
490                    throws com.liferay.portal.kernel.exception.SystemException;
491    }