001 /** 002 * Copyright (c) 2000-2012 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 * <p> 153 * 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. 154 * </p> 155 * 156 * @param name the name 157 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 158 * @return the first matching resource action 159 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 160 * @throws SystemException if a system exception occurred 161 */ 162 public com.liferay.portal.model.ResourceAction findByName_First( 163 java.lang.String name, 164 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 165 throws com.liferay.portal.NoSuchResourceActionException, 166 com.liferay.portal.kernel.exception.SystemException; 167 168 /** 169 * Returns the last resource action in the ordered set where name = ?. 170 * 171 * <p> 172 * 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. 173 * </p> 174 * 175 * @param name the name 176 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 177 * @return the last matching resource action 178 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 179 * @throws SystemException if a system exception occurred 180 */ 181 public com.liferay.portal.model.ResourceAction findByName_Last( 182 java.lang.String name, 183 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 184 throws com.liferay.portal.NoSuchResourceActionException, 185 com.liferay.portal.kernel.exception.SystemException; 186 187 /** 188 * Returns the resource actions before and after the current resource action in the ordered set where name = ?. 189 * 190 * <p> 191 * 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. 192 * </p> 193 * 194 * @param resourceActionId the primary key of the current resource action 195 * @param name the name 196 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 197 * @return the previous, current, and next resource action 198 * @throws com.liferay.portal.NoSuchResourceActionException if a resource action with the primary key could not be found 199 * @throws SystemException if a system exception occurred 200 */ 201 public com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext( 202 long resourceActionId, java.lang.String name, 203 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 204 throws com.liferay.portal.NoSuchResourceActionException, 205 com.liferay.portal.kernel.exception.SystemException; 206 207 /** 208 * Returns the resource action where name = ? and actionId = ? or throws a {@link com.liferay.portal.NoSuchResourceActionException} if it could not be found. 209 * 210 * @param name the name 211 * @param actionId the action ID 212 * @return the matching resource action 213 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 214 * @throws SystemException if a system exception occurred 215 */ 216 public com.liferay.portal.model.ResourceAction findByN_A( 217 java.lang.String name, java.lang.String actionId) 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 returns <code>null</code> if it could not be found. Uses the finder cache. 223 * 224 * @param name the name 225 * @param actionId the action ID 226 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 227 * @throws SystemException if a system exception occurred 228 */ 229 public com.liferay.portal.model.ResourceAction fetchByN_A( 230 java.lang.String name, java.lang.String actionId) 231 throws com.liferay.portal.kernel.exception.SystemException; 232 233 /** 234 * Returns the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 235 * 236 * @param name the name 237 * @param actionId the action ID 238 * @param retrieveFromCache whether to use the finder cache 239 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public com.liferay.portal.model.ResourceAction fetchByN_A( 243 java.lang.String name, java.lang.String actionId, 244 boolean retrieveFromCache) 245 throws com.liferay.portal.kernel.exception.SystemException; 246 247 /** 248 * Returns all the resource actions. 249 * 250 * @return the resource actions 251 * @throws SystemException if a system exception occurred 252 */ 253 public java.util.List<com.liferay.portal.model.ResourceAction> findAll() 254 throws com.liferay.portal.kernel.exception.SystemException; 255 256 /** 257 * Returns a range of all the resource actions. 258 * 259 * <p> 260 * 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. 261 * </p> 262 * 263 * @param start the lower bound of the range of resource actions 264 * @param end the upper bound of the range of resource actions (not inclusive) 265 * @return the range of resource actions 266 * @throws SystemException if a system exception occurred 267 */ 268 public java.util.List<com.liferay.portal.model.ResourceAction> findAll( 269 int start, int end) 270 throws com.liferay.portal.kernel.exception.SystemException; 271 272 /** 273 * Returns an ordered range of all the resource actions. 274 * 275 * <p> 276 * 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. 277 * </p> 278 * 279 * @param start the lower bound of the range of resource actions 280 * @param end the upper bound of the range of resource actions (not inclusive) 281 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 282 * @return the ordered range of resource actions 283 * @throws SystemException if a system exception occurred 284 */ 285 public java.util.List<com.liferay.portal.model.ResourceAction> findAll( 286 int start, int end, 287 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 288 throws com.liferay.portal.kernel.exception.SystemException; 289 290 /** 291 * Removes all the resource actions where name = ? from the database. 292 * 293 * @param name the name 294 * @throws SystemException if a system exception occurred 295 */ 296 public void removeByName(java.lang.String name) 297 throws com.liferay.portal.kernel.exception.SystemException; 298 299 /** 300 * Removes the resource action where name = ? and actionId = ? from the database. 301 * 302 * @param name the name 303 * @param actionId the action ID 304 * @throws SystemException if a system exception occurred 305 */ 306 public void removeByN_A(java.lang.String name, java.lang.String actionId) 307 throws com.liferay.portal.NoSuchResourceActionException, 308 com.liferay.portal.kernel.exception.SystemException; 309 310 /** 311 * Removes all the resource actions from the database. 312 * 313 * @throws SystemException if a system exception occurred 314 */ 315 public void removeAll() 316 throws com.liferay.portal.kernel.exception.SystemException; 317 318 /** 319 * Returns the number of resource actions where name = ?. 320 * 321 * @param name the name 322 * @return the number of matching resource actions 323 * @throws SystemException if a system exception occurred 324 */ 325 public int countByName(java.lang.String name) 326 throws com.liferay.portal.kernel.exception.SystemException; 327 328 /** 329 * Returns the number of resource actions where name = ? and actionId = ?. 330 * 331 * @param name the name 332 * @param actionId the action ID 333 * @return the number of matching resource actions 334 * @throws SystemException if a system exception occurred 335 */ 336 public int countByN_A(java.lang.String name, java.lang.String actionId) 337 throws com.liferay.portal.kernel.exception.SystemException; 338 339 /** 340 * Returns the number of resource actions. 341 * 342 * @return the number of resource actions 343 * @throws SystemException if a system exception occurred 344 */ 345 public int countAll() 346 throws com.liferay.portal.kernel.exception.SystemException; 347 }