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="CompanyPersistence.java.html"><b><i>View Source</i></b></a>
27   *
28   * @author Brian Wing Shun Chan
29   *
30   */
31  public interface CompanyPersistence extends BasePersistence {
32      public void cacheResult(com.liferay.portal.model.Company company);
33  
34      public void cacheResult(
35          java.util.List<com.liferay.portal.model.Company> companies);
36  
37      public void clearCache();
38  
39      public com.liferay.portal.model.Company create(long companyId);
40  
41      public com.liferay.portal.model.Company remove(long companyId)
42          throws com.liferay.portal.NoSuchCompanyException,
43              com.liferay.portal.SystemException;
44  
45      public com.liferay.portal.model.Company remove(
46          com.liferay.portal.model.Company company)
47          throws com.liferay.portal.SystemException;
48  
49      /**
50       * @deprecated Use <code>update(Company company, boolean merge)</code>.
51       */
52      public com.liferay.portal.model.Company update(
53          com.liferay.portal.model.Company company)
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        company 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 company 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.Company update(
70          com.liferay.portal.model.Company company, boolean merge)
71          throws com.liferay.portal.SystemException;
72  
73      public com.liferay.portal.model.Company updateImpl(
74          com.liferay.portal.model.Company company, boolean merge)
75          throws com.liferay.portal.SystemException;
76  
77      public com.liferay.portal.model.Company findByPrimaryKey(long companyId)
78          throws com.liferay.portal.NoSuchCompanyException,
79              com.liferay.portal.SystemException;
80  
81      public com.liferay.portal.model.Company fetchByPrimaryKey(long companyId)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.Company findByWebId(java.lang.String webId)
85          throws com.liferay.portal.NoSuchCompanyException,
86              com.liferay.portal.SystemException;
87  
88      public com.liferay.portal.model.Company fetchByWebId(java.lang.String webId)
89          throws com.liferay.portal.SystemException;
90  
91      public com.liferay.portal.model.Company fetchByWebId(
92          java.lang.String webId, boolean retrieveFromCache)
93          throws com.liferay.portal.SystemException;
94  
95      public com.liferay.portal.model.Company findByVirtualHost(
96          java.lang.String virtualHost)
97          throws com.liferay.portal.NoSuchCompanyException,
98              com.liferay.portal.SystemException;
99  
100     public com.liferay.portal.model.Company fetchByVirtualHost(
101         java.lang.String virtualHost) throws com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.Company fetchByVirtualHost(
104         java.lang.String virtualHost, boolean retrieveFromCache)
105         throws com.liferay.portal.SystemException;
106 
107     public com.liferay.portal.model.Company findByMx(java.lang.String mx)
108         throws com.liferay.portal.NoSuchCompanyException,
109             com.liferay.portal.SystemException;
110 
111     public com.liferay.portal.model.Company fetchByMx(java.lang.String mx)
112         throws com.liferay.portal.SystemException;
113 
114     public com.liferay.portal.model.Company fetchByMx(java.lang.String mx,
115         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
116 
117     public com.liferay.portal.model.Company findByLogoId(long logoId)
118         throws com.liferay.portal.NoSuchCompanyException,
119             com.liferay.portal.SystemException;
120 
121     public com.liferay.portal.model.Company fetchByLogoId(long logoId)
122         throws com.liferay.portal.SystemException;
123 
124     public com.liferay.portal.model.Company fetchByLogoId(long logoId,
125         boolean retrieveFromCache) throws com.liferay.portal.SystemException;
126 
127     public java.util.List<com.liferay.portal.model.Company> findBySystem(
128         boolean system) throws com.liferay.portal.SystemException;
129 
130     public java.util.List<com.liferay.portal.model.Company> findBySystem(
131         boolean system, int start, int end)
132         throws com.liferay.portal.SystemException;
133 
134     public java.util.List<com.liferay.portal.model.Company> findBySystem(
135         boolean system, int start, int end,
136         com.liferay.portal.kernel.util.OrderByComparator obc)
137         throws com.liferay.portal.SystemException;
138 
139     public com.liferay.portal.model.Company findBySystem_First(boolean system,
140         com.liferay.portal.kernel.util.OrderByComparator obc)
141         throws com.liferay.portal.NoSuchCompanyException,
142             com.liferay.portal.SystemException;
143 
144     public com.liferay.portal.model.Company findBySystem_Last(boolean system,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchCompanyException,
147             com.liferay.portal.SystemException;
148 
149     public com.liferay.portal.model.Company[] findBySystem_PrevAndNext(
150         long companyId, boolean system,
151         com.liferay.portal.kernel.util.OrderByComparator obc)
152         throws com.liferay.portal.NoSuchCompanyException,
153             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.Company> findAll()
164         throws com.liferay.portal.SystemException;
165 
166     public java.util.List<com.liferay.portal.model.Company> findAll(int start,
167         int end) throws com.liferay.portal.SystemException;
168 
169     public java.util.List<com.liferay.portal.model.Company> findAll(int start,
170         int end, com.liferay.portal.kernel.util.OrderByComparator obc)
171         throws com.liferay.portal.SystemException;
172 
173     public void removeByWebId(java.lang.String webId)
174         throws com.liferay.portal.NoSuchCompanyException,
175             com.liferay.portal.SystemException;
176 
177     public void removeByVirtualHost(java.lang.String virtualHost)
178         throws com.liferay.portal.NoSuchCompanyException,
179             com.liferay.portal.SystemException;
180 
181     public void removeByMx(java.lang.String mx)
182         throws com.liferay.portal.NoSuchCompanyException,
183             com.liferay.portal.SystemException;
184 
185     public void removeByLogoId(long logoId)
186         throws com.liferay.portal.NoSuchCompanyException,
187             com.liferay.portal.SystemException;
188 
189     public void removeBySystem(boolean system)
190         throws com.liferay.portal.SystemException;
191 
192     public void removeAll() throws com.liferay.portal.SystemException;
193 
194     public int countByWebId(java.lang.String webId)
195         throws com.liferay.portal.SystemException;
196 
197     public int countByVirtualHost(java.lang.String virtualHost)
198         throws com.liferay.portal.SystemException;
199 
200     public int countByMx(java.lang.String mx)
201         throws com.liferay.portal.SystemException;
202 
203     public int countByLogoId(long logoId)
204         throws com.liferay.portal.SystemException;
205 
206     public int countBySystem(boolean system)
207         throws com.liferay.portal.SystemException;
208 
209     public int countAll() throws com.liferay.portal.SystemException;
210 }