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