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