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.ResourceAction; 020 021 /** 022 * The persistence interface for the resource action 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.ResourceActionPersistenceImpl 030 * @see ResourceActionUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface ResourceActionPersistence extends BasePersistence<ResourceAction> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link ResourceActionUtil} to access the resource action persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the resource actions where name = ?. 043 * 044 * @param name the name 045 * @return the matching resource actions 046 */ 047 public java.util.List<ResourceAction> findByName(java.lang.String name); 048 049 /** 050 * Returns a range of all the resource actions where name = ?. 051 * 052 * <p> 053 * 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 ResourceActionModelImpl}. 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. 054 * </p> 055 * 056 * @param name the name 057 * @param start the lower bound of the range of resource actions 058 * @param end the upper bound of the range of resource actions (not inclusive) 059 * @return the range of matching resource actions 060 */ 061 public java.util.List<ResourceAction> findByName(java.lang.String name, 062 int start, int end); 063 064 /** 065 * Returns an ordered range of all the resource actions where name = ?. 066 * 067 * <p> 068 * 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 ResourceActionModelImpl}. 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. 069 * </p> 070 * 071 * @param name the name 072 * @param start the lower bound of the range of resource actions 073 * @param end the upper bound of the range of resource actions (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching resource actions 076 */ 077 public java.util.List<ResourceAction> findByName(java.lang.String name, 078 int start, int end, 079 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 080 081 /** 082 * Returns an ordered range of all the resource actions where name = ?. 083 * 084 * <p> 085 * 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 ResourceActionModelImpl}. 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. 086 * </p> 087 * 088 * @param name the name 089 * @param start the lower bound of the range of resource actions 090 * @param end the upper bound of the range of resource actions (not inclusive) 091 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 092 * @param retrieveFromCache whether to retrieve from the finder cache 093 * @return the ordered range of matching resource actions 094 */ 095 public java.util.List<ResourceAction> findByName(java.lang.String name, 096 int start, int end, 097 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator, 098 boolean retrieveFromCache); 099 100 /** 101 * Returns the first resource action in the ordered set where name = ?. 102 * 103 * @param name the name 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching resource action 106 * @throws NoSuchResourceActionException if a matching resource action could not be found 107 */ 108 public ResourceAction findByName_First(java.lang.String name, 109 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 110 throws com.liferay.portal.exception.NoSuchResourceActionException; 111 112 /** 113 * Returns the first resource action in the ordered set where name = ?. 114 * 115 * @param name the name 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the first matching resource action, or <code>null</code> if a matching resource action could not be found 118 */ 119 public ResourceAction fetchByName_First(java.lang.String name, 120 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 121 122 /** 123 * Returns the last resource action in the ordered set where name = ?. 124 * 125 * @param name the name 126 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 127 * @return the last matching resource action 128 * @throws NoSuchResourceActionException if a matching resource action could not be found 129 */ 130 public ResourceAction findByName_Last(java.lang.String name, 131 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 132 throws com.liferay.portal.exception.NoSuchResourceActionException; 133 134 /** 135 * Returns the last resource action in the ordered set where name = ?. 136 * 137 * @param name the name 138 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 139 * @return the last matching resource action, or <code>null</code> if a matching resource action could not be found 140 */ 141 public ResourceAction fetchByName_Last(java.lang.String name, 142 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 143 144 /** 145 * Returns the resource actions before and after the current resource action in the ordered set where name = ?. 146 * 147 * @param resourceActionId the primary key of the current resource action 148 * @param name the name 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next resource action 151 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 152 */ 153 public ResourceAction[] findByName_PrevAndNext(long resourceActionId, 154 java.lang.String name, 155 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 156 throws com.liferay.portal.exception.NoSuchResourceActionException; 157 158 /** 159 * Removes all the resource actions where name = ? from the database. 160 * 161 * @param name the name 162 */ 163 public void removeByName(java.lang.String name); 164 165 /** 166 * Returns the number of resource actions where name = ?. 167 * 168 * @param name the name 169 * @return the number of matching resource actions 170 */ 171 public int countByName(java.lang.String name); 172 173 /** 174 * Returns the resource action where name = ? and actionId = ? or throws a {@link NoSuchResourceActionException} if it could not be found. 175 * 176 * @param name the name 177 * @param actionId the action ID 178 * @return the matching resource action 179 * @throws NoSuchResourceActionException if a matching resource action could not be found 180 */ 181 public ResourceAction findByN_A(java.lang.String name, 182 java.lang.String actionId) 183 throws com.liferay.portal.exception.NoSuchResourceActionException; 184 185 /** 186 * Returns the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 187 * 188 * @param name the name 189 * @param actionId the action ID 190 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 191 */ 192 public ResourceAction fetchByN_A(java.lang.String name, 193 java.lang.String actionId); 194 195 /** 196 * Returns the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 197 * 198 * @param name the name 199 * @param actionId the action ID 200 * @param retrieveFromCache whether to retrieve from the finder cache 201 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 202 */ 203 public ResourceAction fetchByN_A(java.lang.String name, 204 java.lang.String actionId, boolean retrieveFromCache); 205 206 /** 207 * Removes the resource action where name = ? and actionId = ? from the database. 208 * 209 * @param name the name 210 * @param actionId the action ID 211 * @return the resource action that was removed 212 */ 213 public ResourceAction removeByN_A(java.lang.String name, 214 java.lang.String actionId) 215 throws com.liferay.portal.exception.NoSuchResourceActionException; 216 217 /** 218 * Returns the number of resource actions where name = ? and actionId = ?. 219 * 220 * @param name the name 221 * @param actionId the action ID 222 * @return the number of matching resource actions 223 */ 224 public int countByN_A(java.lang.String name, java.lang.String actionId); 225 226 /** 227 * Caches the resource action in the entity cache if it is enabled. 228 * 229 * @param resourceAction the resource action 230 */ 231 public void cacheResult(ResourceAction resourceAction); 232 233 /** 234 * Caches the resource actions in the entity cache if it is enabled. 235 * 236 * @param resourceActions the resource actions 237 */ 238 public void cacheResult(java.util.List<ResourceAction> resourceActions); 239 240 /** 241 * Creates a new resource action with the primary key. Does not add the resource action to the database. 242 * 243 * @param resourceActionId the primary key for the new resource action 244 * @return the new resource action 245 */ 246 public ResourceAction create(long resourceActionId); 247 248 /** 249 * Removes the resource action with the primary key from the database. Also notifies the appropriate model listeners. 250 * 251 * @param resourceActionId the primary key of the resource action 252 * @return the resource action that was removed 253 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 254 */ 255 public ResourceAction remove(long resourceActionId) 256 throws com.liferay.portal.exception.NoSuchResourceActionException; 257 258 public ResourceAction updateImpl(ResourceAction resourceAction); 259 260 /** 261 * Returns the resource action with the primary key or throws a {@link NoSuchResourceActionException} if it could not be found. 262 * 263 * @param resourceActionId the primary key of the resource action 264 * @return the resource action 265 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 266 */ 267 public ResourceAction findByPrimaryKey(long resourceActionId) 268 throws com.liferay.portal.exception.NoSuchResourceActionException; 269 270 /** 271 * Returns the resource action with the primary key or returns <code>null</code> if it could not be found. 272 * 273 * @param resourceActionId the primary key of the resource action 274 * @return the resource action, or <code>null</code> if a resource action with the primary key could not be found 275 */ 276 public ResourceAction fetchByPrimaryKey(long resourceActionId); 277 278 @Override 279 public java.util.Map<java.io.Serializable, ResourceAction> fetchByPrimaryKeys( 280 java.util.Set<java.io.Serializable> primaryKeys); 281 282 /** 283 * Returns all the resource actions. 284 * 285 * @return the resource actions 286 */ 287 public java.util.List<ResourceAction> findAll(); 288 289 /** 290 * Returns a range of all the resource actions. 291 * 292 * <p> 293 * 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 ResourceActionModelImpl}. 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. 294 * </p> 295 * 296 * @param start the lower bound of the range of resource actions 297 * @param end the upper bound of the range of resource actions (not inclusive) 298 * @return the range of resource actions 299 */ 300 public java.util.List<ResourceAction> findAll(int start, int end); 301 302 /** 303 * Returns an ordered range of all the resource actions. 304 * 305 * <p> 306 * 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 ResourceActionModelImpl}. 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. 307 * </p> 308 * 309 * @param start the lower bound of the range of resource actions 310 * @param end the upper bound of the range of resource actions (not inclusive) 311 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 312 * @return the ordered range of resource actions 313 */ 314 public java.util.List<ResourceAction> findAll(int start, int end, 315 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 316 317 /** 318 * Returns an ordered range of all the resource actions. 319 * 320 * <p> 321 * 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 ResourceActionModelImpl}. 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. 322 * </p> 323 * 324 * @param start the lower bound of the range of resource actions 325 * @param end the upper bound of the range of resource actions (not inclusive) 326 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 327 * @param retrieveFromCache whether to retrieve from the finder cache 328 * @return the ordered range of resource actions 329 */ 330 public java.util.List<ResourceAction> findAll(int start, int end, 331 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator, 332 boolean retrieveFromCache); 333 334 /** 335 * Removes all the resource actions from the database. 336 */ 337 public void removeAll(); 338 339 /** 340 * Returns the number of resource actions. 341 * 342 * @return the number of resource actions 343 */ 344 public int countAll(); 345 }