001 /** 002 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 013 */ 014 015 package com.liferay.portal.service.persistence; 016 017 import com.liferay.portal.kernel.exception.SystemException; 018 import com.liferay.portal.model.ResourceAction; 019 020 /** 021 * The persistence interface for the resource action service. 022 * 023 * <p> 024 * Caching information and settings can be found in <code>portal.properties</code> 025 * </p> 026 * 027 * @author Brian Wing Shun Chan 028 * @see ResourceActionPersistenceImpl 029 * @see ResourceActionUtil 030 * @generated 031 */ 032 public interface ResourceActionPersistence extends BasePersistence<ResourceAction> { 033 /* 034 * NOTE FOR DEVELOPERS: 035 * 036 * 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. 037 */ 038 039 /** 040 * Caches the resource action in the entity cache if it is enabled. 041 * 042 * @param resourceAction the resource action to cache 043 */ 044 public void cacheResult( 045 com.liferay.portal.model.ResourceAction resourceAction); 046 047 /** 048 * Caches the resource actions in the entity cache if it is enabled. 049 * 050 * @param resourceActions the resource actions to cache 051 */ 052 public void cacheResult( 053 java.util.List<com.liferay.portal.model.ResourceAction> resourceActions); 054 055 /** 056 * Creates a new resource action with the primary key. Does not add the resource action to the database. 057 * 058 * @param resourceActionId the primary key for the new resource action 059 * @return the new resource action 060 */ 061 public com.liferay.portal.model.ResourceAction create(long resourceActionId); 062 063 /** 064 * Removes the resource action with the primary key from the database. Also notifies the appropriate model listeners. 065 * 066 * @param resourceActionId the primary key of the resource action to remove 067 * @return the resource action that was removed 068 * @throws com.liferay.portal.NoSuchResourceActionException if a resource action with the primary key could not be found 069 * @throws SystemException if a system exception occurred 070 */ 071 public com.liferay.portal.model.ResourceAction remove(long resourceActionId) 072 throws com.liferay.portal.NoSuchResourceActionException, 073 com.liferay.portal.kernel.exception.SystemException; 074 075 public com.liferay.portal.model.ResourceAction updateImpl( 076 com.liferay.portal.model.ResourceAction resourceAction, boolean merge) 077 throws com.liferay.portal.kernel.exception.SystemException; 078 079 /** 080 * Finds the resource action with the primary key or throws a {@link com.liferay.portal.NoSuchResourceActionException} if it could not be found. 081 * 082 * @param resourceActionId the primary key of the resource action to find 083 * @return the resource action 084 * @throws com.liferay.portal.NoSuchResourceActionException if a resource action with the primary key could not be found 085 * @throws SystemException if a system exception occurred 086 */ 087 public com.liferay.portal.model.ResourceAction findByPrimaryKey( 088 long resourceActionId) 089 throws com.liferay.portal.NoSuchResourceActionException, 090 com.liferay.portal.kernel.exception.SystemException; 091 092 /** 093 * Finds the resource action with the primary key or returns <code>null</code> if it could not be found. 094 * 095 * @param resourceActionId the primary key of the resource action to find 096 * @return the resource action, or <code>null</code> if a resource action with the primary key could not be found 097 * @throws SystemException if a system exception occurred 098 */ 099 public com.liferay.portal.model.ResourceAction fetchByPrimaryKey( 100 long resourceActionId) 101 throws com.liferay.portal.kernel.exception.SystemException; 102 103 /** 104 * Finds all the resource actions where name = ?. 105 * 106 * @param name the name to search with 107 * @return the matching resource actions 108 * @throws SystemException if a system exception occurred 109 */ 110 public java.util.List<com.liferay.portal.model.ResourceAction> findByName( 111 java.lang.String name) 112 throws com.liferay.portal.kernel.exception.SystemException; 113 114 /** 115 * Finds a range of all the resource actions where name = ?. 116 * 117 * <p> 118 * 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. 119 * </p> 120 * 121 * @param name the name to search with 122 * @param start the lower bound of the range of resource actions to return 123 * @param end the upper bound of the range of resource actions to return (not inclusive) 124 * @return the range of matching resource actions 125 * @throws SystemException if a system exception occurred 126 */ 127 public java.util.List<com.liferay.portal.model.ResourceAction> findByName( 128 java.lang.String name, int start, int end) 129 throws com.liferay.portal.kernel.exception.SystemException; 130 131 /** 132 * Finds an ordered range of all the resource actions where name = ?. 133 * 134 * <p> 135 * 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. 136 * </p> 137 * 138 * @param name the name to search with 139 * @param start the lower bound of the range of resource actions to return 140 * @param end the upper bound of the range of resource actions to return (not inclusive) 141 * @param orderByComparator the comparator to order the results by 142 * @return the ordered range of matching resource actions 143 * @throws SystemException if a system exception occurred 144 */ 145 public java.util.List<com.liferay.portal.model.ResourceAction> findByName( 146 java.lang.String name, int start, int end, 147 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 148 throws com.liferay.portal.kernel.exception.SystemException; 149 150 /** 151 * Finds the first resource action in the ordered set where name = ?. 152 * 153 * <p> 154 * 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. 155 * </p> 156 * 157 * @param name the name to search with 158 * @param orderByComparator the comparator to order the set by 159 * @return the first matching resource action 160 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 161 * @throws SystemException if a system exception occurred 162 */ 163 public com.liferay.portal.model.ResourceAction findByName_First( 164 java.lang.String name, 165 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 166 throws com.liferay.portal.NoSuchResourceActionException, 167 com.liferay.portal.kernel.exception.SystemException; 168 169 /** 170 * Finds the last resource action in the ordered set where name = ?. 171 * 172 * <p> 173 * 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. 174 * </p> 175 * 176 * @param name the name to search with 177 * @param orderByComparator the comparator to order the set by 178 * @return the last matching resource action 179 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 180 * @throws SystemException if a system exception occurred 181 */ 182 public com.liferay.portal.model.ResourceAction findByName_Last( 183 java.lang.String name, 184 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 185 throws com.liferay.portal.NoSuchResourceActionException, 186 com.liferay.portal.kernel.exception.SystemException; 187 188 /** 189 * Finds the resource actions before and after the current resource action in the ordered set where name = ?. 190 * 191 * <p> 192 * 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. 193 * </p> 194 * 195 * @param resourceActionId the primary key of the current resource action 196 * @param name the name to search with 197 * @param orderByComparator the comparator to order the set by 198 * @return the previous, current, and next resource action 199 * @throws com.liferay.portal.NoSuchResourceActionException if a resource action with the primary key could not be found 200 * @throws SystemException if a system exception occurred 201 */ 202 public com.liferay.portal.model.ResourceAction[] findByName_PrevAndNext( 203 long resourceActionId, java.lang.String name, 204 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 205 throws com.liferay.portal.NoSuchResourceActionException, 206 com.liferay.portal.kernel.exception.SystemException; 207 208 /** 209 * Finds the resource action where name = ? and actionId = ? or throws a {@link com.liferay.portal.NoSuchResourceActionException} if it could not be found. 210 * 211 * @param name the name to search with 212 * @param actionId the action ID to search with 213 * @return the matching resource action 214 * @throws com.liferay.portal.NoSuchResourceActionException if a matching resource action could not be found 215 * @throws SystemException if a system exception occurred 216 */ 217 public com.liferay.portal.model.ResourceAction findByN_A( 218 java.lang.String name, java.lang.String actionId) 219 throws com.liferay.portal.NoSuchResourceActionException, 220 com.liferay.portal.kernel.exception.SystemException; 221 222 /** 223 * Finds the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 224 * 225 * @param name the name to search with 226 * @param actionId the action ID to search with 227 * @return the matching resource action, or <code>null</code> 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 fetchByN_A( 231 java.lang.String name, java.lang.String actionId) 232 throws com.liferay.portal.kernel.exception.SystemException; 233 234 /** 235 * Finds the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 236 * 237 * @param name the name to search with 238 * @param actionId the action ID to search with 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 * Finds 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 * Finds 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 to return 264 * @param end the upper bound of the range of resource actions to return (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 * Finds 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 to return 280 * @param end the upper bound of the range of resource actions to return (not inclusive) 281 * @param orderByComparator the comparator to order the results by 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 to search with 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 to search with 303 * @param actionId the action ID to search with 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 * Counts all the resource actions where name = ?. 320 * 321 * @param name the name to search with 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 * Counts all the resource actions where name = ? and actionId = ?. 330 * 331 * @param name the name to search with 332 * @param actionId the action ID to search with 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 * Counts all the 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 348 public ResourceAction remove(ResourceAction resourceAction) 349 throws SystemException; 350 }