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 to cache 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 to cache 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 to remove 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 * Finds 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 to find 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 * Finds 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 to find 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 * Finds all the service components where buildNamespace = ?. 108 * 109 * @param buildNamespace the build namespace to search with 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 * Finds 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 to search with 125 * @param start the lower bound of the range of service components to return 126 * @param end the upper bound of the range of service components to return (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 * Finds 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 to search with 142 * @param start the lower bound of the range of service components to return 143 * @param end the upper bound of the range of service components to return (not inclusive) 144 * @param orderByComparator the comparator to order the results by 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 * Finds 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 to search with 161 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 180 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 200 * @param orderByComparator the comparator to order the set by 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 * Finds 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 to search with 215 * @param buildNumber the build number to search with 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 * Finds 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 to search with 229 * @param buildNumber the build number to search with 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 * Finds 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 to search with 241 * @param buildNumber the build number to search with 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 boolean retrieveFromCache) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Finds all the service components. 252 * 253 * @return the service components 254 * @throws SystemException if a system exception occurred 255 */ 256 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll() 257 throws com.liferay.portal.kernel.exception.SystemException; 258 259 /** 260 * Finds a range of all the service components. 261 * 262 * <p> 263 * 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. 264 * </p> 265 * 266 * @param start the lower bound of the range of service components to return 267 * @param end the upper bound of the range of service components to return (not inclusive) 268 * @return the range of service components 269 * @throws SystemException if a system exception occurred 270 */ 271 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 272 int start, int end) 273 throws com.liferay.portal.kernel.exception.SystemException; 274 275 /** 276 * Finds an ordered range of all the service components. 277 * 278 * <p> 279 * 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. 280 * </p> 281 * 282 * @param start the lower bound of the range of service components to return 283 * @param end the upper bound of the range of service components to return (not inclusive) 284 * @param orderByComparator the comparator to order the results by 285 * @return the ordered range of service components 286 * @throws SystemException if a system exception occurred 287 */ 288 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 289 int start, int end, 290 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 291 throws com.liferay.portal.kernel.exception.SystemException; 292 293 /** 294 * Removes all the service components where buildNamespace = ? from the database. 295 * 296 * @param buildNamespace the build namespace to search with 297 * @throws SystemException if a system exception occurred 298 */ 299 public void removeByBuildNamespace(java.lang.String buildNamespace) 300 throws com.liferay.portal.kernel.exception.SystemException; 301 302 /** 303 * Removes the service component where buildNamespace = ? and buildNumber = ? from the database. 304 * 305 * @param buildNamespace the build namespace to search with 306 * @param buildNumber the build number to search with 307 * @throws SystemException if a system exception occurred 308 */ 309 public void removeByBNS_BNU(java.lang.String buildNamespace, 310 long buildNumber) 311 throws com.liferay.portal.NoSuchServiceComponentException, 312 com.liferay.portal.kernel.exception.SystemException; 313 314 /** 315 * Removes all the service components from the database. 316 * 317 * @throws SystemException if a system exception occurred 318 */ 319 public void removeAll() 320 throws com.liferay.portal.kernel.exception.SystemException; 321 322 /** 323 * Counts all the service components where buildNamespace = ?. 324 * 325 * @param buildNamespace the build namespace to search with 326 * @return the number of matching service components 327 * @throws SystemException if a system exception occurred 328 */ 329 public int countByBuildNamespace(java.lang.String buildNamespace) 330 throws com.liferay.portal.kernel.exception.SystemException; 331 332 /** 333 * Counts all the service components where buildNamespace = ? and buildNumber = ?. 334 * 335 * @param buildNamespace the build namespace to search with 336 * @param buildNumber the build number to search with 337 * @return the number of matching service components 338 * @throws SystemException if a system exception occurred 339 */ 340 public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber) 341 throws com.liferay.portal.kernel.exception.SystemException; 342 343 /** 344 * Counts all the service components. 345 * 346 * @return the number of service components 347 * @throws SystemException if a system exception occurred 348 */ 349 public int countAll() 350 throws com.liferay.portal.kernel.exception.SystemException; 351 352 public ServiceComponent remove(ServiceComponent serviceComponent) 353 throws SystemException; 354 }