1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights 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  /**
27   * <a href="ResourceCodePersistence.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * @author    Brian Wing Shun Chan
35   * @see       ResourceCodePersistenceImpl
36   * @see       ResourceCodeUtil
37   * @generated
38   */
39  public interface ResourceCodePersistence extends BasePersistence {
40      public void cacheResult(com.liferay.portal.model.ResourceCode resourceCode);
41  
42      public void cacheResult(
43          java.util.List<com.liferay.portal.model.ResourceCode> resourceCodes);
44  
45      public void clearCache();
46  
47      public com.liferay.portal.model.ResourceCode create(long codeId);
48  
49      public com.liferay.portal.model.ResourceCode remove(long codeId)
50          throws com.liferay.portal.NoSuchResourceCodeException,
51              com.liferay.portal.SystemException;
52  
53      public com.liferay.portal.model.ResourceCode remove(
54          com.liferay.portal.model.ResourceCode resourceCode)
55          throws com.liferay.portal.SystemException;
56  
57      /**
58       * @deprecated Use {@link #update(ResourceCode, boolean merge)}.
59       */
60      public com.liferay.portal.model.ResourceCode update(
61          com.liferay.portal.model.ResourceCode resourceCode)
62          throws com.liferay.portal.SystemException;
63  
64      /**
65       * Add, update, or merge, the entity. This method also calls the model
66       * listeners to trigger the proper events associated with adding, deleting,
67       * or updating an entity.
68       *
69       * @param  resourceCode the entity to add, update, or merge
70       * @param  merge boolean value for whether to merge the entity. The default
71       *         value is false. Setting merge to true is more expensive and
72       *         should only be true when resourceCode is transient. See
73       *         LEP-5473 for a detailed discussion of this method.
74       * @return the entity that was added, updated, or merged
75       */
76      public com.liferay.portal.model.ResourceCode update(
77          com.liferay.portal.model.ResourceCode resourceCode, boolean merge)
78          throws com.liferay.portal.SystemException;
79  
80      public com.liferay.portal.model.ResourceCode updateImpl(
81          com.liferay.portal.model.ResourceCode resourceCode, boolean merge)
82          throws com.liferay.portal.SystemException;
83  
84      public com.liferay.portal.model.ResourceCode findByPrimaryKey(long codeId)
85          throws com.liferay.portal.NoSuchResourceCodeException,
86              com.liferay.portal.SystemException;
87  
88      public com.liferay.portal.model.ResourceCode fetchByPrimaryKey(long codeId)
89          throws com.liferay.portal.SystemException;
90  
91      public java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
92          long companyId) throws com.liferay.portal.SystemException;
93  
94      public java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
95          long companyId, int start, int end)
96          throws com.liferay.portal.SystemException;
97  
98      public java.util.List<com.liferay.portal.model.ResourceCode> findByCompanyId(
99          long companyId, int start, int end,
100         com.liferay.portal.kernel.util.OrderByComparator obc)
101         throws com.liferay.portal.SystemException;
102 
103     public com.liferay.portal.model.ResourceCode findByCompanyId_First(
104         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
105         throws com.liferay.portal.NoSuchResourceCodeException,
106             com.liferay.portal.SystemException;
107 
108     public com.liferay.portal.model.ResourceCode findByCompanyId_Last(
109         long companyId, com.liferay.portal.kernel.util.OrderByComparator obc)
110         throws com.liferay.portal.NoSuchResourceCodeException,
111             com.liferay.portal.SystemException;
112 
113     public com.liferay.portal.model.ResourceCode[] findByCompanyId_PrevAndNext(
114         long codeId, long companyId,
115         com.liferay.portal.kernel.util.OrderByComparator obc)
116         throws com.liferay.portal.NoSuchResourceCodeException,
117             com.liferay.portal.SystemException;
118 
119     public java.util.List<com.liferay.portal.model.ResourceCode> findByName(
120         java.lang.String name) throws com.liferay.portal.SystemException;
121 
122     public java.util.List<com.liferay.portal.model.ResourceCode> findByName(
123         java.lang.String name, int start, int end)
124         throws com.liferay.portal.SystemException;
125 
126     public java.util.List<com.liferay.portal.model.ResourceCode> findByName(
127         java.lang.String name, int start, int end,
128         com.liferay.portal.kernel.util.OrderByComparator obc)
129         throws com.liferay.portal.SystemException;
130 
131     public com.liferay.portal.model.ResourceCode findByName_First(
132         java.lang.String name,
133         com.liferay.portal.kernel.util.OrderByComparator obc)
134         throws com.liferay.portal.NoSuchResourceCodeException,
135             com.liferay.portal.SystemException;
136 
137     public com.liferay.portal.model.ResourceCode findByName_Last(
138         java.lang.String name,
139         com.liferay.portal.kernel.util.OrderByComparator obc)
140         throws com.liferay.portal.NoSuchResourceCodeException,
141             com.liferay.portal.SystemException;
142 
143     public com.liferay.portal.model.ResourceCode[] findByName_PrevAndNext(
144         long codeId, java.lang.String name,
145         com.liferay.portal.kernel.util.OrderByComparator obc)
146         throws com.liferay.portal.NoSuchResourceCodeException,
147             com.liferay.portal.SystemException;
148 
149     public com.liferay.portal.model.ResourceCode findByC_N_S(long companyId,
150         java.lang.String name, int scope)
151         throws com.liferay.portal.NoSuchResourceCodeException,
152             com.liferay.portal.SystemException;
153 
154     public com.liferay.portal.model.ResourceCode fetchByC_N_S(long companyId,
155         java.lang.String name, int scope)
156         throws com.liferay.portal.SystemException;
157 
158     public com.liferay.portal.model.ResourceCode fetchByC_N_S(long companyId,
159         java.lang.String name, int scope, boolean retrieveFromCache)
160         throws com.liferay.portal.SystemException;
161 
162     public java.util.List<Object> findWithDynamicQuery(
163         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
164         throws com.liferay.portal.SystemException;
165 
166     public java.util.List<Object> findWithDynamicQuery(
167         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168         int end) throws com.liferay.portal.SystemException;
169 
170     public java.util.List<com.liferay.portal.model.ResourceCode> findAll()
171         throws com.liferay.portal.SystemException;
172 
173     public java.util.List<com.liferay.portal.model.ResourceCode> findAll(
174         int start, int end) throws com.liferay.portal.SystemException;
175 
176     public java.util.List<com.liferay.portal.model.ResourceCode> findAll(
177         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
178         throws com.liferay.portal.SystemException;
179 
180     public void removeByCompanyId(long companyId)
181         throws com.liferay.portal.SystemException;
182 
183     public void removeByName(java.lang.String name)
184         throws com.liferay.portal.SystemException;
185 
186     public void removeByC_N_S(long companyId, java.lang.String name, int scope)
187         throws com.liferay.portal.NoSuchResourceCodeException,
188             com.liferay.portal.SystemException;
189 
190     public void removeAll() throws com.liferay.portal.SystemException;
191 
192     public int countByCompanyId(long companyId)
193         throws com.liferay.portal.SystemException;
194 
195     public int countByName(java.lang.String name)
196         throws com.liferay.portal.SystemException;
197 
198     public int countByC_N_S(long companyId, java.lang.String name, int scope)
199         throws com.liferay.portal.SystemException;
200 
201     public int countAll() throws com.liferay.portal.SystemException;
202 }