001 /** 002 * Copyright (c) 2000-2011 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.kernel.exception.SystemException; 018 import com.liferay.portal.model.ServiceComponent; 019 020 /** 021 * The persistence interface for the service component service. 022 * 023 * <p> 024 * Caching information and settings can be found in <code>portal.properties</code> 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see ServiceComponentPersistenceImpl 029 * @see ServiceComponentUtil 030 * @generated 031 */ 032 public interface ServiceComponentPersistence extends BasePersistence<ServiceComponent> { 033 /* 034 * NOTE FOR DEVELOPERS: 035 * 036 * Never modify or reference this interface directly. Always use {@link ServiceComponentUtil} to access the service component persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 037 */ 038 039 /** 040 * Caches the service component in the entity cache if it is enabled. 041 * 042 * @param serviceComponent the service component 043 */ 044 public void cacheResult( 045 com.liferay.portal.model.ServiceComponent serviceComponent); 046 047 /** 048 * Caches the service components in the entity cache if it is enabled. 049 * 050 * @param serviceComponents the service components 051 */ 052 public void cacheResult( 053 java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents); 054 055 /** 056 * Creates a new service component with the primary key. Does not add the service component to the database. 057 * 058 * @param serviceComponentId the primary key for the new service component 059 * @return the new service component 060 */ 061 public com.liferay.portal.model.ServiceComponent create( 062 long serviceComponentId); 063 064 /** 065 * Removes the service component with the primary key from the database. Also notifies the appropriate model listeners. 066 * 067 * @param serviceComponentId the primary key of the service component 068 * @return the service component that was removed 069 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 070 * @throws SystemException if a system exception occurred 071 */ 072 public com.liferay.portal.model.ServiceComponent remove( 073 long serviceComponentId) 074 throws com.liferay.portal.NoSuchServiceComponentException, 075 com.liferay.portal.kernel.exception.SystemException; 076 077 public com.liferay.portal.model.ServiceComponent updateImpl( 078 com.liferay.portal.model.ServiceComponent serviceComponent, 079 boolean merge) 080 throws com.liferay.portal.kernel.exception.SystemException; 081 082 /** 083 * Returns the service component with the primary key or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found. 084 * 085 * @param serviceComponentId the primary key of the service component 086 * @return the service component 087 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 088 * @throws SystemException if a system exception occurred 089 */ 090 public com.liferay.portal.model.ServiceComponent findByPrimaryKey( 091 long serviceComponentId) 092 throws com.liferay.portal.NoSuchServiceComponentException, 093 com.liferay.portal.kernel.exception.SystemException; 094 095 /** 096 * Returns the service component with the primary key or returns <code>null</code> if it could not be found. 097 * 098 * @param serviceComponentId the primary key of the service component 099 * @return the service component, or <code>null</code> if a service component with the primary key could not be found 100 * @throws SystemException if a system exception occurred 101 */ 102 public com.liferay.portal.model.ServiceComponent fetchByPrimaryKey( 103 long serviceComponentId) 104 throws com.liferay.portal.kernel.exception.SystemException; 105 106 /** 107 * Returns all the service components where buildNamespace = ?. 108 * 109 * @param buildNamespace the build namespace 110 * @return the matching service components 111 * @throws SystemException if a system exception occurred 112 */ 113 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 114 java.lang.String buildNamespace) 115 throws com.liferay.portal.kernel.exception.SystemException; 116 117 /** 118 * Returns a range of all the service components where buildNamespace = ?. 119 * 120 * <p> 121 * 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. 122 * </p> 123 * 124 * @param buildNamespace the build namespace 125 * @param start the lower bound of the range of service components 126 * @param end the upper bound of the range of service components (not inclusive) 127 * @return the range of matching service components 128 * @throws SystemException if a system exception occurred 129 */ 130 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 131 java.lang.String buildNamespace, int start, int end) 132 throws com.liferay.portal.kernel.exception.SystemException; 133 134 /** 135 * Returns an ordered range of all the service components where buildNamespace = ?. 136 * 137 * <p> 138 * 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. 139 * </p> 140 * 141 * @param buildNamespace the build namespace 142 * @param start the lower bound of the range of service components 143 * @param end the upper bound of the range of service components (not inclusive) 144 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 145 * @return the ordered range of matching service components 146 * @throws SystemException if a system exception occurred 147 */ 148 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 149 java.lang.String buildNamespace, int start, int end, 150 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 151 throws com.liferay.portal.kernel.exception.SystemException; 152 153 /** 154 * Returns the first service component in the ordered set where buildNamespace = ?. 155 * 156 * <p> 157 * 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. 158 * </p> 159 * 160 * @param buildNamespace the build namespace 161 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 162 * @return the first matching service component 163 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 164 * @throws SystemException if a system exception occurred 165 */ 166 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First( 167 java.lang.String buildNamespace, 168 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 169 throws com.liferay.portal.NoSuchServiceComponentException, 170 com.liferay.portal.kernel.exception.SystemException; 171 172 /** 173 * Returns the last service component in the ordered set where buildNamespace = ?. 174 * 175 * <p> 176 * 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. 177 * </p> 178 * 179 * @param buildNamespace the build namespace 180 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 181 * @return the last matching service component 182 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 183 * @throws SystemException if a system exception occurred 184 */ 185 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last( 186 java.lang.String buildNamespace, 187 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 188 throws com.liferay.portal.NoSuchServiceComponentException, 189 com.liferay.portal.kernel.exception.SystemException; 190 191 /** 192 * Returns the service components before and after the current service component in the ordered set where buildNamespace = ?. 193 * 194 * <p> 195 * 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. 196 * </p> 197 * 198 * @param serviceComponentId the primary key of the current service component 199 * @param buildNamespace the build namespace 200 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 201 * @return the previous, current, and next service component 202 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 203 * @throws SystemException if a system exception occurred 204 */ 205 public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext( 206 long serviceComponentId, java.lang.String buildNamespace, 207 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 208 throws com.liferay.portal.NoSuchServiceComponentException, 209 com.liferay.portal.kernel.exception.SystemException; 210 211 /** 212 * Returns the service component where buildNamespace = ? and buildNumber = ? or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found. 213 * 214 * @param buildNamespace the build namespace 215 * @param buildNumber the build number 216 * @return the matching service component 217 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 218 * @throws SystemException if a system exception occurred 219 */ 220 public com.liferay.portal.model.ServiceComponent findByBNS_BNU( 221 java.lang.String buildNamespace, long buildNumber) 222 throws com.liferay.portal.NoSuchServiceComponentException, 223 com.liferay.portal.kernel.exception.SystemException; 224 225 /** 226 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 227 * 228 * @param buildNamespace the build namespace 229 * @param buildNumber the build number 230 * @return the matching service component, or <code>null</code> if a matching service component could not be found 231 * @throws SystemException if a system exception occurred 232 */ 233 public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 234 java.lang.String buildNamespace, long buildNumber) 235 throws com.liferay.portal.kernel.exception.SystemException; 236 237 /** 238 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 239 * 240 * @param buildNamespace the build namespace 241 * @param buildNumber the build number 242 * @param retrieveFromCache whether to use the finder cache 243 * @return the matching service component, or <code>null</code> if a matching service component could not be found 244 * @throws SystemException if a system exception occurred 245 */ 246 public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 247 java.lang.String buildNamespace, long buildNumber, 248 boolean retrieveFromCache) 249 throws com.liferay.portal.kernel.exception.SystemException; 250 251 /** 252 * Returns all the service components. 253 * 254 * @return the service components 255 * @throws SystemException if a system exception occurred 256 */ 257 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll() 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Returns a range of all the service components. 262 * 263 * <p> 264 * 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. 265 * </p> 266 * 267 * @param start the lower bound of the range of service components 268 * @param end the upper bound of the range of service components (not inclusive) 269 * @return the range of service components 270 * @throws SystemException if a system exception occurred 271 */ 272 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 273 int start, int end) 274 throws com.liferay.portal.kernel.exception.SystemException; 275 276 /** 277 * Returns an ordered range of all the service components. 278 * 279 * <p> 280 * 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. 281 * </p> 282 * 283 * @param start the lower bound of the range of service components 284 * @param end the upper bound of the range of service components (not inclusive) 285 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 286 * @return the ordered range of service components 287 * @throws SystemException if a system exception occurred 288 */ 289 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 290 int start, int end, 291 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 292 throws com.liferay.portal.kernel.exception.SystemException; 293 294 /** 295 * Removes all the service components where buildNamespace = ? from the database. 296 * 297 * @param buildNamespace the build namespace 298 * @throws SystemException if a system exception occurred 299 */ 300 public void removeByBuildNamespace(java.lang.String buildNamespace) 301 throws com.liferay.portal.kernel.exception.SystemException; 302 303 /** 304 * Removes the service component where buildNamespace = ? and buildNumber = ? from the database. 305 * 306 * @param buildNamespace the build namespace 307 * @param buildNumber the build number 308 * @throws SystemException if a system exception occurred 309 */ 310 public void removeByBNS_BNU(java.lang.String buildNamespace, 311 long buildNumber) 312 throws com.liferay.portal.NoSuchServiceComponentException, 313 com.liferay.portal.kernel.exception.SystemException; 314 315 /** 316 * Removes all the service components from the database. 317 * 318 * @throws SystemException if a system exception occurred 319 */ 320 public void removeAll() 321 throws com.liferay.portal.kernel.exception.SystemException; 322 323 /** 324 * Returns the number of service components where buildNamespace = ?. 325 * 326 * @param buildNamespace the build namespace 327 * @return the number of matching service components 328 * @throws SystemException if a system exception occurred 329 */ 330 public int countByBuildNamespace(java.lang.String buildNamespace) 331 throws com.liferay.portal.kernel.exception.SystemException; 332 333 /** 334 * Returns the number of service components where buildNamespace = ? and buildNumber = ?. 335 * 336 * @param buildNamespace the build namespace 337 * @param buildNumber the build number 338 * @return the number of matching service components 339 * @throws SystemException if a system exception occurred 340 */ 341 public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber) 342 throws com.liferay.portal.kernel.exception.SystemException; 343 344 /** 345 * Returns the number of service components. 346 * 347 * @return the number of service components 348 * @throws SystemException if a system exception occurred 349 */ 350 public int countAll() 351 throws com.liferay.portal.kernel.exception.SystemException; 352 353 public ServiceComponent remove(ServiceComponent serviceComponent) 354 throws SystemException; 355 }