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