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 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<com.liferay.portal.model.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 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. 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<com.liferay.portal.model.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 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. 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<com.liferay.portal.model.ServiceComponent> findByBuildNamespace( 079 java.lang.String buildNamespace, int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 089 */ 090 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_First( 091 java.lang.String buildNamespace, 092 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_First( 103 java.lang.String buildNamespace, 104 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 113 */ 114 public com.liferay.portal.model.ServiceComponent findByBuildNamespace_Last( 115 java.lang.String buildNamespace, 116 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.model.ServiceComponent fetchByBuildNamespace_Last( 127 java.lang.String buildNamespace, 128 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 138 */ 139 public com.liferay.portal.model.ServiceComponent[] findByBuildNamespace_PrevAndNext( 140 long serviceComponentId, java.lang.String buildNamespace, 141 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.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 com.liferay.portal.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 com.liferay.portal.NoSuchServiceComponentException if a matching service component could not be found 166 */ 167 public com.liferay.portal.model.ServiceComponent findByBNS_BNU( 168 java.lang.String buildNamespace, 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 com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 179 java.lang.String buildNamespace, 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 com.liferay.portal.model.ServiceComponent fetchByBNS_BNU( 190 java.lang.String buildNamespace, long buildNumber, 191 boolean retrieveFromCache); 192 193 /** 194 * Removes the service component where buildNamespace = ? and buildNumber = ? from the database. 195 * 196 * @param buildNamespace the build namespace 197 * @param buildNumber the build number 198 * @return the service component that was removed 199 */ 200 public com.liferay.portal.model.ServiceComponent removeByBNS_BNU( 201 java.lang.String buildNamespace, long buildNumber) 202 throws com.liferay.portal.NoSuchServiceComponentException; 203 204 /** 205 * Returns the number of service components where buildNamespace = ? and buildNumber = ?. 206 * 207 * @param buildNamespace the build namespace 208 * @param buildNumber the build number 209 * @return the number of matching service components 210 */ 211 public int countByBNS_BNU(java.lang.String buildNamespace, long buildNumber); 212 213 /** 214 * Caches the service component in the entity cache if it is enabled. 215 * 216 * @param serviceComponent the service component 217 */ 218 public void cacheResult( 219 com.liferay.portal.model.ServiceComponent serviceComponent); 220 221 /** 222 * Caches the service components in the entity cache if it is enabled. 223 * 224 * @param serviceComponents the service components 225 */ 226 public void cacheResult( 227 java.util.List<com.liferay.portal.model.ServiceComponent> serviceComponents); 228 229 /** 230 * Creates a new service component with the primary key. Does not add the service component to the database. 231 * 232 * @param serviceComponentId the primary key for the new service component 233 * @return the new service component 234 */ 235 public com.liferay.portal.model.ServiceComponent create( 236 long serviceComponentId); 237 238 /** 239 * Removes the service component with the primary key from the database. Also notifies the appropriate model listeners. 240 * 241 * @param serviceComponentId the primary key of the service component 242 * @return the service component that was removed 243 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 244 */ 245 public com.liferay.portal.model.ServiceComponent remove( 246 long serviceComponentId) 247 throws com.liferay.portal.NoSuchServiceComponentException; 248 249 public com.liferay.portal.model.ServiceComponent updateImpl( 250 com.liferay.portal.model.ServiceComponent serviceComponent); 251 252 /** 253 * Returns the service component with the primary key or throws a {@link com.liferay.portal.NoSuchServiceComponentException} if it could not be found. 254 * 255 * @param serviceComponentId the primary key of the service component 256 * @return the service component 257 * @throws com.liferay.portal.NoSuchServiceComponentException if a service component with the primary key could not be found 258 */ 259 public com.liferay.portal.model.ServiceComponent findByPrimaryKey( 260 long serviceComponentId) 261 throws com.liferay.portal.NoSuchServiceComponentException; 262 263 /** 264 * Returns the service component with the primary key or returns <code>null</code> if it could not be found. 265 * 266 * @param serviceComponentId the primary key of the service component 267 * @return the service component, or <code>null</code> if a service component with the primary key could not be found 268 */ 269 public com.liferay.portal.model.ServiceComponent fetchByPrimaryKey( 270 long serviceComponentId); 271 272 @Override 273 public java.util.Map<java.io.Serializable, com.liferay.portal.model.ServiceComponent> fetchByPrimaryKeys( 274 java.util.Set<java.io.Serializable> primaryKeys); 275 276 /** 277 * Returns all the service components. 278 * 279 * @return the service components 280 */ 281 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll(); 282 283 /** 284 * Returns a range of all the service components. 285 * 286 * <p> 287 * 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. 288 * </p> 289 * 290 * @param start the lower bound of the range of service components 291 * @param end the upper bound of the range of service components (not inclusive) 292 * @return the range of service components 293 */ 294 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 295 int start, int end); 296 297 /** 298 * Returns an ordered range of all the service components. 299 * 300 * <p> 301 * 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. 302 * </p> 303 * 304 * @param start the lower bound of the range of service components 305 * @param end the upper bound of the range of service components (not inclusive) 306 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 307 * @return the ordered range of service components 308 */ 309 public java.util.List<com.liferay.portal.model.ServiceComponent> findAll( 310 int start, int end, 311 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.ServiceComponent> orderByComparator); 312 313 /** 314 * Removes all the service components from the database. 315 */ 316 public void removeAll(); 317 318 /** 319 * Returns the number of service components. 320 * 321 * @return the number of service components 322 */ 323 public int countAll(); 324 }