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