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  import com.liferay.portal.PortalException;
26  import com.liferay.portal.SystemException;
27  import com.liferay.portal.kernel.annotation.Propagation;
28  import com.liferay.portal.kernel.annotation.Transactional;
29  
30  /**
31   * <a href="ServiceComponentPersistence.java.html"><b><i>View Source</i></b></a>
32   *
33   * @author Brian Wing Shun Chan
34   *
35   */
36  @Transactional(rollbackFor =  {
37      PortalException.class, SystemException.class})
38  public interface ServiceComponentPersistence extends BasePersistence {
39      public com.liferay.portal.model.ServiceComponent create(
40          long serviceComponentId);
41  
42      public com.liferay.portal.model.ServiceComponent remove(
43          long serviceComponentId)
44          throws com.liferay.portal.NoSuchServiceComponentException,
45              com.liferay.portal.SystemException;
46  
47      public com.liferay.portal.model.ServiceComponent remove(
48          com.liferay.portal.model.ServiceComponent serviceComponent)
49          throws com.liferay.portal.SystemException;
50  
51      /**
52       * @deprecated Use <code>update(ServiceComponent serviceComponent, boolean merge)</code>.
53       */
54      public com.liferay.portal.model.ServiceComponent update(
55          com.liferay.portal.model.ServiceComponent serviceComponent)
56          throws com.liferay.portal.SystemException;
57  
58      /**
59       * Add, update, or merge, the entity. This method also calls the model
60       * listeners to trigger the proper events associated with adding, deleting,
61       * or updating an entity.
62       *
63       * @param        serviceComponent the entity to add, update, or merge
64       * @param        merge boolean value for whether to merge the entity. The
65       *                default value is false. Setting merge to true is more
66       *                expensive and should only be true when serviceComponent is
67       *                transient. See LEP-5473 for a detailed discussion of this
68       *                method.
69       * @return        true if the portlet can be displayed via Ajax
70       */
71      public com.liferay.portal.model.ServiceComponent update(
72          com.liferay.portal.model.ServiceComponent serviceComponent,
73          boolean merge) throws com.liferay.portal.SystemException;
74  
75      public com.liferay.portal.model.ServiceComponent updateImpl(
76          com.liferay.portal.model.ServiceComponent serviceComponent,
77          boolean merge) throws com.liferay.portal.SystemException;
78  
79      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
80      public com.liferay.portal.model.ServiceComponent findByPrimaryKey(
81          long serviceComponentId)
82          throws com.liferay.portal.NoSuchServiceComponentException,
83              com.liferay.portal.SystemException;
84  
85      public com.liferay.portal.model.ServiceComponent fetchByPrimaryKey(
86          long serviceComponentId) throws com.liferay.portal.SystemException;
87  
88      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
89      public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
90          java.lang.String buildNamespace)
91          throws com.liferay.portal.SystemException;
92  
93      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
94      public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
95          java.lang.String buildNamespace, int start, int end)
96          throws com.liferay.portal.SystemException;
97  
98      @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
99      public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace(
100         java.lang.String buildNamespace, int start, int end,
101         com.liferay.portal.kernel.util.OrderByComparator obc)
102         throws com.liferay.portal.SystemException;
103 
104     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
105     public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First(
106         java.lang.String buildNamespace,
107         com.liferay.portal.kernel.util.OrderByComparator obc)
108         throws com.liferay.portal.NoSuchServiceComponentException,
109             com.liferay.portal.SystemException;
110 
111     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
112     public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last(
113         java.lang.String buildNamespace,
114         com.liferay.portal.kernel.util.OrderByComparator obc)
115         throws com.liferay.portal.NoSuchServiceComponentException,
116             com.liferay.portal.SystemException;
117 
118     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
119     public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext(
120         long serviceComponentId, java.lang.String buildNamespace,
121         com.liferay.portal.kernel.util.OrderByComparator obc)
122         throws com.liferay.portal.NoSuchServiceComponentException,
123             com.liferay.portal.SystemException;
124 
125     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126     public com.liferay.portal.model.ServiceComponent findByBNS_BNU(
127         java.lang.String buildNamespace, long buildNumber)
128         throws com.liferay.portal.NoSuchServiceComponentException,
129             com.liferay.portal.SystemException;
130 
131     public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU(
132         java.lang.String buildNamespace, long buildNumber)
133         throws com.liferay.portal.SystemException;
134 
135     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
136     public java.util.List<Object> findWithDynamicQuery(
137         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
138         throws com.liferay.portal.SystemException;
139 
140     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
141     public java.util.List<Object> findWithDynamicQuery(
142         com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
143         int end) throws com.liferay.portal.SystemException;
144 
145     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
146     public java.util.List<com.liferay.portal.model.ServiceComponent> findAll()
147         throws com.liferay.portal.SystemException;
148 
149     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
150     public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
151         int start, int end) throws com.liferay.portal.SystemException;
152 
153     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
154     public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(
155         int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
156         throws com.liferay.portal.SystemException;
157 
158     public void removeByBuildNamespace(java.lang.String buildNamespace)
159         throws com.liferay.portal.SystemException;
160 
161     public void removeByBNS_BNU(java.lang.String buildNamespace,
162         long buildNumber)
163         throws com.liferay.portal.NoSuchServiceComponentException,
164             com.liferay.portal.SystemException;
165 
166     public void removeAll() throws com.liferay.portal.SystemException;
167 
168     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169     public int countByBuildNamespace(java.lang.String buildNamespace)
170         throws com.liferay.portal.SystemException;
171 
172     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
173     public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber)
174         throws com.liferay.portal.SystemException;
175 
176     @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
177     public int countAll() throws com.liferay.portal.SystemException;
178 }