001 /** 002 * Copyright (c) 2000-present 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 com.liferay.portal.service.persistence.impl.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 */ 047 public java.util.List<ServiceComponent> findByBuildNamespace( 048 java.lang.String buildNamespace); 049 050 /** 051 * Returns a range of all the service components where buildNamespace = ?. 052 * 053 * <p> 054 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 055 * </p> 056 * 057 * @param buildNamespace the build namespace 058 * @param start the lower bound of the range of service components 059 * @param end the upper bound of the range of service components (not inclusive) 060 * @return the range of matching service components 061 */ 062 public java.util.List<ServiceComponent> findByBuildNamespace( 063 java.lang.String buildNamespace, int start, int end); 064 065 /** 066 * Returns an ordered range of all the service components where buildNamespace = ?. 067 * 068 * <p> 069 * 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 070 * </p> 071 * 072 * @param buildNamespace the build namespace 073 * @param start the lower bound of the range of service components 074 * @param end the upper bound of the range of service components (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching service components 077 */ 078 public java.util.List<ServiceComponent> findByBuildNamespace( 079 java.lang.String buildNamespace, int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator); 081 082 /** 083 * Returns the first service component in the ordered set where buildNamespace = ?. 084 * 085 * @param buildNamespace the build namespace 086 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 087 * @return the first matching service component 088 * @throws NoSuchServiceComponentException if a matching service component could not be found 089 */ 090 public ServiceComponent findByBuildNamespace_First( 091 java.lang.String buildNamespace, 092 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator) 093 throws com.liferay.portal.NoSuchServiceComponentException; 094 095 /** 096 * Returns the first service component in the ordered set where buildNamespace = ?. 097 * 098 * @param buildNamespace the build namespace 099 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 100 * @return the first matching service component, or <code>null</code> if a matching service component could not be found 101 */ 102 public ServiceComponent fetchByBuildNamespace_First( 103 java.lang.String buildNamespace, 104 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator); 105 106 /** 107 * Returns the last service component in the ordered set where buildNamespace = ?. 108 * 109 * @param buildNamespace the build namespace 110 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 111 * @return the last matching service component 112 * @throws NoSuchServiceComponentException if a matching service component could not be found 113 */ 114 public ServiceComponent findByBuildNamespace_Last( 115 java.lang.String buildNamespace, 116 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator) 117 throws com.liferay.portal.NoSuchServiceComponentException; 118 119 /** 120 * Returns the last service component in the ordered set where buildNamespace = ?. 121 * 122 * @param buildNamespace the build namespace 123 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 124 * @return the last matching service component, or <code>null</code> if a matching service component could not be found 125 */ 126 public ServiceComponent fetchByBuildNamespace_Last( 127 java.lang.String buildNamespace, 128 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator); 129 130 /** 131 * Returns the service components before and after the current service component in the ordered set where buildNamespace = ?. 132 * 133 * @param serviceComponentId the primary key of the current service component 134 * @param buildNamespace the build namespace 135 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 136 * @return the previous, current, and next service component 137 * @throws NoSuchServiceComponentException if a service component with the primary key could not be found 138 */ 139 public ServiceComponent[] findByBuildNamespace_PrevAndNext( 140 long serviceComponentId, java.lang.String buildNamespace, 141 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator) 142 throws com.liferay.portal.NoSuchServiceComponentException; 143 144 /** 145 * Removes all the service components where buildNamespace = ? from the database. 146 * 147 * @param buildNamespace the build namespace 148 */ 149 public void removeByBuildNamespace(java.lang.String buildNamespace); 150 151 /** 152 * Returns the number of service components where buildNamespace = ?. 153 * 154 * @param buildNamespace the build namespace 155 * @return the number of matching service components 156 */ 157 public int countByBuildNamespace(java.lang.String buildNamespace); 158 159 /** 160 * Returns the service component where buildNamespace = ? and buildNumber = ? or throws a {@link NoSuchServiceComponentException} if it could not be found. 161 * 162 * @param buildNamespace the build namespace 163 * @param buildNumber the build number 164 * @return the matching service component 165 * @throws NoSuchServiceComponentException if a matching service component could not be found 166 */ 167 public ServiceComponent findByBNS_BNU(java.lang.String buildNamespace, 168 long buildNumber) 169 throws com.liferay.portal.NoSuchServiceComponentException; 170 171 /** 172 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 173 * 174 * @param buildNamespace the build namespace 175 * @param buildNumber the build number 176 * @return the matching service component, or <code>null</code> if a matching service component could not be found 177 */ 178 public ServiceComponent fetchByBNS_BNU(java.lang.String buildNamespace, 179 long buildNumber); 180 181 /** 182 * Returns the service component where buildNamespace = ? and buildNumber = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 183 * 184 * @param buildNamespace the build namespace 185 * @param buildNumber the build number 186 * @param retrieveFromCache whether to use the finder cache 187 * @return the matching service component, or <code>null</code> if a matching service component could not be found 188 */ 189 public ServiceComponent fetchByBNS_BNU(java.lang.String buildNamespace, 190 long buildNumber, boolean retrieveFromCache); 191 192 /** 193 * Removes the service component where buildNamespace = ? and buildNumber = ? from the database. 194 * 195 * @param buildNamespace the build namespace 196 * @param buildNumber the build number 197 * @return the service component that was removed 198 */ 199 public ServiceComponent removeByBNS_BNU(java.lang.String buildNamespace, 200 long buildNumber) 201 throws com.liferay.portal.NoSuchServiceComponentException; 202 203 /** 204 * Returns the number of service components where buildNamespace = ? and buildNumber = ?. 205 * 206 * @param buildNamespace the build namespace 207 * @param buildNumber the build number 208 * @return the number of matching service components 209 */ 210 public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber); 211 212 /** 213 * Caches the service component in the entity cache if it is enabled. 214 * 215 * @param serviceComponent the service component 216 */ 217 public void cacheResult(ServiceComponent serviceComponent); 218 219 /** 220 * Caches the service components in the entity cache if it is enabled. 221 * 222 * @param serviceComponents the service components 223 */ 224 public void cacheResult(java.util.List<ServiceComponent> serviceComponents); 225 226 /** 227 * Creates a new service component with the primary key. Does not add the service component to the database. 228 * 229 * @param serviceComponentId the primary key for the new service component 230 * @return the new service component 231 */ 232 public ServiceComponent create(long serviceComponentId); 233 234 /** 235 * Removes the service component with the primary key from the database. Also notifies the appropriate model listeners. 236 * 237 * @param serviceComponentId the primary key of the service component 238 * @return the service component that was removed 239 * @throws NoSuchServiceComponentException if a service component with the primary key could not be found 240 */ 241 public ServiceComponent remove(long serviceComponentId) 242 throws com.liferay.portal.NoSuchServiceComponentException; 243 244 public ServiceComponent updateImpl(ServiceComponent serviceComponent); 245 246 /** 247 * Returns the service component with the primary key or throws a {@link NoSuchServiceComponentException} if it could not be found. 248 * 249 * @param serviceComponentId the primary key of the service component 250 * @return the service component 251 * @throws NoSuchServiceComponentException if a service component with the primary key could not be found 252 */ 253 public ServiceComponent findByPrimaryKey(long serviceComponentId) 254 throws com.liferay.portal.NoSuchServiceComponentException; 255 256 /** 257 * Returns the service component with the primary key or returns <code>null</code> if it could not be found. 258 * 259 * @param serviceComponentId the primary key of the service component 260 * @return the service component, or <code>null</code> if a service component with the primary key could not be found 261 */ 262 public ServiceComponent fetchByPrimaryKey(long serviceComponentId); 263 264 @Override 265 public java.util.Map<java.io.Serializable, ServiceComponent> fetchByPrimaryKeys( 266 java.util.Set<java.io.Serializable> primaryKeys); 267 268 /** 269 * Returns all the service components. 270 * 271 * @return the service components 272 */ 273 public java.util.List<ServiceComponent> findAll(); 274 275 /** 276 * Returns a 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 280 * </p> 281 * 282 * @param start the lower bound of the range of service components 283 * @param end the upper bound of the range of service components (not inclusive) 284 * @return the range of service components 285 */ 286 public java.util.List<ServiceComponent> findAll(int start, int end); 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 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 QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link 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. 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 */ 300 public java.util.List<ServiceComponent> findAll(int start, int end, 301 com.liferay.portal.kernel.util.OrderByComparator<ServiceComponent> orderByComparator); 302 303 /** 304 * Removes all the service components from the database. 305 */ 306 public void removeAll(); 307 308 /** 309 * Returns the number of service components. 310 * 311 * @return the number of service components 312 */ 313 public int countAll(); 314 }