001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.ServiceComponent; 020 021 /** 022 * The persistence interface for the service component service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see ServiceComponentPersistenceImpl 030 * @see ServiceComponentUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface ServiceComponentPersistence extends BasePersistence<ServiceComponent> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * 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. 039 */ 040 041 /** 042 * Returns all the service components where buildNamespace = ?. 043 * 044 * @param buildNamespace the build namespace 045 * @return the matching service components 046 * @throws SystemException if a system exception occurred 047 */ 048 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 049 java.lang.String buildNamespace) 050 throws com.liferay.portal.kernel.exception.SystemException; 051 052 /** 053 * Returns a range of all the service components where buildNamespace = ?. 054 * 055 * <p> 056 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ServiceComponentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 057 * </p> 058 * 059 * @param buildNamespace the build namespace 060 * @param start the lower bound of the range of service components 061 * @param end the upper bound of the range of service components (not inclusive) 062 * @return the range of matching service components 063 * @throws SystemException if a system exception occurred 064 */ 065 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 066 java.lang.String buildNamespace, int start, int end) 067 throws com.liferay.portal.kernel.exception.SystemException; 068 069 /** 070 * Returns an ordered range of all the service components where buildNamespace = ?. 071 * 072 * <p> 073 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ServiceComponentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 074 * </p> 075 * 076 * @param buildNamespace the build namespace 077 * @param start the lower bound of the range of service components 078 * @param end the upper bound of the range of service components (not inclusive) 079 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 080 * @return the ordered range of matching service components 081 * @throws SystemException if a system exception occurred 082 */ 083 public java.util.List<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 084 java.lang.String buildNamespace, int start, int end, 085 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 086 throws com.liferay.portal.kernel.exception.SystemException; 087 088 /** 089 * Returns the first service component in the ordered set where buildNamespace = ?. 090 * 091 * @param buildNamespace the build namespace 092 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 093 * @return the first matching service component 094 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 095 * @throws SystemException if a system exception occurred 096 */ 097 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First( 098 java.lang.String buildNamespace, 099 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 100 throws com.liferay.portal.NoSuchServiceComponentException, 101 com.liferay.portal.kernel.exception.SystemException; 102 103 /** 104 * Returns the first service component in the ordered set where buildNamespace = ?. 105 * 106 * @param buildNamespace the build namespace 107 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 108 * @return the first matching service component, or <code>null</code> if a matching service component could not be found 109 * @throws SystemException if a system exception occurred 110 */ 111 public com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_First( 112 java.lang.String buildNamespace, 113 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 114 throws com.liferay.portal.kernel.exception.SystemException; 115 116 /** 117 * Returns the last service component in the ordered set where buildNamespace = ?. 118 * 119 * @param buildNamespace the build namespace 120 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 121 * @return the last matching service component 122 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 123 * @throws SystemException if a system exception occurred 124 */ 125 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last( 126 java.lang.String buildNamespace, 127 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 128 throws com.liferay.portal.NoSuchServiceComponentException, 129 com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Returns the last service component in the ordered set where buildNamespace = ?. 133 * 134 * @param buildNamespace the build namespace 135 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 136 * @return the last matching service component, or <code>null</code> if a matching service component could not be found 137 * @throws SystemException if a system exception occurred 138 */ 139 public com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_Last( 140 java.lang.String buildNamespace, 141 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 142 throws com.liferay.portal.kernel.exception.SystemException; 143 144 /** 145 * Returns the service components before and after the current service component in the ordered set where buildNamespace = ?. 146 * 147 * @param serviceComponentId the primary key of the current service component 148 * @param buildNamespace the build namespace 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next service component 151 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 152 * @throws SystemException if a system exception occurred 153 */ 154 public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext( 155 long serviceComponentId, java.lang.String buildNamespace, 156 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 157 throws com.liferay.portal.NoSuchServiceComponentException, 158 com.liferay.portal.kernel.exception.SystemException; 159 160 /** 161 * Removes all the service components where buildNamespace = ? from the database. 162 * 163 * @param buildNamespace the build namespace 164 * @throws SystemException if a system exception occurred 165 */ 166 public void removeByBuildNamespace(java.lang.String buildNamespace) 167 throws com.liferay.portal.kernel.exception.SystemException; 168 169 /** 170 * Returns the number of service components where buildNamespace = ?. 171 * 172 * @param buildNamespace the build namespace 173 * @return the number of matching service components 174 * @throws SystemException if a system exception occurred 175 */ 176 public int countByBuildNamespace(java.lang.String buildNamespace) 177 throws com.liferay.portal.kernel.exception.SystemException; 178 179 /** 180 * Returns the service component where buildNamespace = ? and buildNumber = ? or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found. 181 * 182 * @param buildNamespace the build namespace 183 * @param buildNumber the build number 184 * @return the matching service component 185 * @throws com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 186 * @throws SystemException if a system exception occurred 187 */ 188 public com.liferay.portal.model.ServiceComponent findByBNS_BNU( 189 java.lang.String buildNamespace, long buildNumber) 190 throws com.liferay.portal.NoSuchServiceComponentException, 191 com.liferay.portal.kernel.exception.SystemException; 192 193 /** 194 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 195 * 196 * @param buildNamespace the build namespace 197 * @param buildNumber the build number 198 * @return the matching service component, or <code>null</code> if a matching service component could not be found 199 * @throws SystemException if a system exception occurred 200 */ 201 public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 202 java.lang.String buildNamespace, long buildNumber) 203 throws com.liferay.portal.kernel.exception.SystemException; 204 205 /** 206 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 207 * 208 * @param buildNamespace the build namespace 209 * @param buildNumber the build number 210 * @param retrieveFromCache whether to use the finder cache 211 * @return the matching service component, or <code>null</code> if a matching service component could not be found 212 * @throws SystemException if a system exception occurred 213 */ 214 public com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 215 java.lang.String buildNamespace, long buildNumber, 216 boolean retrieveFromCache) 217 throws com.liferay.portal.kernel.exception.SystemException; 218 219 /** 220 * Removes the service component where buildNamespace = ? and buildNumber = ? from the database. 221 * 222 * @param buildNamespace the build namespace 223 * @param buildNumber the build number 224 * @return the service component that was removed 225 * @throws SystemException if a system exception occurred 226 */ 227 public com.liferay.portal.model.ServiceComponent removeByBNS_BNU( 228 java.lang.String buildNamespace, long buildNumber) 229 throws com.liferay.portal.NoSuchServiceComponentException, 230 com.liferay.portal.kernel.exception.SystemException; 231 232 /** 233 * Returns the number of service components where buildNamespace = ? and buildNumber = ?. 234 * 235 * @param buildNamespace the build namespace 236 * @param buildNumber the build number 237 * @return the number of matching service components 238 * @throws SystemException if a system exception occurred 239 */ 240 public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber) 241 throws com.liferay.portal.kernel.exception.SystemException; 242 243 /** 244 * Caches the service component in the entity cache if it is enabled. 245 * 246 * @param serviceComponent the service component 247 */ 248 public void cacheResult( 249 com.liferay.portal.model.ServiceComponent serviceComponent); 250 251 /** 252 * Caches the service components in the entity cache if it is enabled. 253 * 254 * @param serviceComponents the service components 255 */ 256 public void cacheResult( 257 java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents); 258 259 /** 260 * Creates a new service component with the primary key. Does not add the service component to the database. 261 * 262 * @param serviceComponentId the primary key for the new service component 263 * @return the new service component 264 */ 265 public com.liferay.portal.model.ServiceComponent create( 266 long serviceComponentId); 267 268 /** 269 * Removes the service component with the primary key from the database. Also notifies the appropriate model listeners. 270 * 271 * @param serviceComponentId the primary key of the service component 272 * @return the service component that was removed 273 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 274 * @throws SystemException if a system exception occurred 275 */ 276 public com.liferay.portal.model.ServiceComponent remove( 277 long serviceComponentId) 278 throws com.liferay.portal.NoSuchServiceComponentException, 279 com.liferay.portal.kernel.exception.SystemException; 280 281 public com.liferay.portal.model.ServiceComponent updateImpl( 282 com.liferay.portal.model.ServiceComponent serviceComponent) 283 throws com.liferay.portal.kernel.exception.SystemException; 284 285 /** 286 * Returns the service component with the primary key or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found. 287 * 288 * @param serviceComponentId the primary key of the service component 289 * @return the service component 290 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 291 * @throws SystemException if a system exception occurred 292 */ 293 public com.liferay.portal.model.ServiceComponent findByPrimaryKey( 294 long serviceComponentId) 295 throws com.liferay.portal.NoSuchServiceComponentException, 296 com.liferay.portal.kernel.exception.SystemException; 297 298 /** 299 * Returns the service component with the primary key or returns <code>null</code> if it could not be found. 300 * 301 * @param serviceComponentId the primary key of the service component 302 * @return the service component, or <code>null</code> if a service component with the primary key could not be found 303 * @throws SystemException if a system exception occurred 304 */ 305 public com.liferay.portal.model.ServiceComponent fetchByPrimaryKey( 306 long serviceComponentId) 307 throws com.liferay.portal.kernel.exception.SystemException; 308 309 /** 310 * Returns all the service components. 311 * 312 * @return the service components 313 * @throws SystemException if a system exception occurred 314 */ 315 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll() 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Returns a range of all the service components. 320 * 321 * <p> 322 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ServiceComponentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 323 * </p> 324 * 325 * @param start the lower bound of the range of service components 326 * @param end the upper bound of the range of service components (not inclusive) 327 * @return the range of service components 328 * @throws SystemException if a system exception occurred 329 */ 330 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 331 int start, int end) 332 throws com.liferay.portal.kernel.exception.SystemException; 333 334 /** 335 * Returns an ordered range of all the service components. 336 * 337 * <p> 338 * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.ServiceComponentModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 339 * </p> 340 * 341 * @param start the lower bound of the range of service components 342 * @param end the upper bound of the range of service components (not inclusive) 343 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 344 * @return the ordered range of service components 345 * @throws SystemException if a system exception occurred 346 */ 347 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 348 int start, int end, 349 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 350 throws com.liferay.portal.kernel.exception.SystemException; 351 352 /** 353 * Removes all the service components from the database. 354 * 355 * @throws SystemException if a system exception occurred 356 */ 357 public void removeAll() 358 throws com.liferay.portal.kernel.exception.SystemException; 359 360 /** 361 * Returns the number of service components. 362 * 363 * @return the number of service components 364 * @throws SystemException if a system exception occurred 365 */ 366 public int countAll() 367 throws com.liferay.portal.kernel.exception.SystemException; 368 }