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 the first resource action in the ordered set where name = ?. 083 * 084 * @param name the name 085 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 086 * @return the first matching resource action 087 * @throws NoSuchResourceActionException if a matching resource action could not be found 088 */ 089 public ResourceAction findByName_First(java.lang.String name, 090 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 091 throws com.liferay.portal.NoSuchResourceActionException; 092 093 /** 094 * Returns the first resource action in the ordered set where name = ?. 095 * 096 * @param name the name 097 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 098 * @return the first matching resource action, or <code>null</code> if a matching resource action could not be found 099 */ 100 public ResourceAction fetchByName_First(java.lang.String name, 101 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 102 103 /** 104 * Returns the last 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 last matching resource action 109 * @throws NoSuchResourceActionException if a matching resource action could not be found 110 */ 111 public ResourceAction findByName_Last(java.lang.String name, 112 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 113 throws com.liferay.portal.NoSuchResourceActionException; 114 115 /** 116 * Returns the last resource action in the ordered set where name = ?. 117 * 118 * @param name the name 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the last matching resource action, or <code>null</code> if a matching resource action could not be found 121 */ 122 public ResourceAction fetchByName_Last(java.lang.String name, 123 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 124 125 /** 126 * Returns the resource actions before and after the current resource action in the ordered set where name = ?. 127 * 128 * @param resourceActionId the primary key of the current resource action 129 * @param name the name 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the previous, current, and next resource action 132 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 133 */ 134 public ResourceAction[] findByName_PrevAndNext(long resourceActionId, 135 java.lang.String name, 136 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator) 137 throws com.liferay.portal.NoSuchResourceActionException; 138 139 /** 140 * Removes all the resource actions where name = ? from the database. 141 * 142 * @param name the name 143 */ 144 public void removeByName(java.lang.String name); 145 146 /** 147 * Returns the number of resource actions where name = ?. 148 * 149 * @param name the name 150 * @return the number of matching resource actions 151 */ 152 public int countByName(java.lang.String name); 153 154 /** 155 * Returns the resource action where name = ? and actionId = ? or throws a {@link NoSuchResourceActionException} if it could not be found. 156 * 157 * @param name the name 158 * @param actionId the action ID 159 * @return the matching resource action 160 * @throws NoSuchResourceActionException if a matching resource action could not be found 161 */ 162 public ResourceAction findByN_A(java.lang.String name, 163 java.lang.String actionId) 164 throws com.liferay.portal.NoSuchResourceActionException; 165 166 /** 167 * Returns the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 168 * 169 * @param name the name 170 * @param actionId the action ID 171 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 172 */ 173 public ResourceAction fetchByN_A(java.lang.String name, 174 java.lang.String actionId); 175 176 /** 177 * Returns the resource action where name = ? and actionId = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 178 * 179 * @param name the name 180 * @param actionId the action ID 181 * @param retrieveFromCache whether to use the finder cache 182 * @return the matching resource action, or <code>null</code> if a matching resource action could not be found 183 */ 184 public ResourceAction fetchByN_A(java.lang.String name, 185 java.lang.String actionId, boolean retrieveFromCache); 186 187 /** 188 * Removes the resource action where name = ? and actionId = ? from the database. 189 * 190 * @param name the name 191 * @param actionId the action ID 192 * @return the resource action that was removed 193 */ 194 public ResourceAction removeByN_A(java.lang.String name, 195 java.lang.String actionId) 196 throws com.liferay.portal.NoSuchResourceActionException; 197 198 /** 199 * Returns the number of resource actions where name = ? and actionId = ?. 200 * 201 * @param name the name 202 * @param actionId the action ID 203 * @return the number of matching resource actions 204 */ 205 public int countByN_A(java.lang.String name, java.lang.String actionId); 206 207 /** 208 * Caches the resource action in the entity cache if it is enabled. 209 * 210 * @param resourceAction the resource action 211 */ 212 public void cacheResult(ResourceAction resourceAction); 213 214 /** 215 * Caches the resource actions in the entity cache if it is enabled. 216 * 217 * @param resourceActions the resource actions 218 */ 219 public void cacheResult(java.util.List<ResourceAction> resourceActions); 220 221 /** 222 * Creates a new resource action with the primary key. Does not add the resource action to the database. 223 * 224 * @param resourceActionId the primary key for the new resource action 225 * @return the new resource action 226 */ 227 public ResourceAction create(long resourceActionId); 228 229 /** 230 * Removes the resource action with the primary key from the database. Also notifies the appropriate model listeners. 231 * 232 * @param resourceActionId the primary key of the resource action 233 * @return the resource action that was removed 234 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 235 */ 236 public ResourceAction remove(long resourceActionId) 237 throws com.liferay.portal.NoSuchResourceActionException; 238 239 public ResourceAction updateImpl(ResourceAction resourceAction); 240 241 /** 242 * Returns the resource action with the primary key or throws a {@link NoSuchResourceActionException} if it could not be found. 243 * 244 * @param resourceActionId the primary key of the resource action 245 * @return the resource action 246 * @throws NoSuchResourceActionException if a resource action with the primary key could not be found 247 */ 248 public ResourceAction findByPrimaryKey(long resourceActionId) 249 throws com.liferay.portal.NoSuchResourceActionException; 250 251 /** 252 * Returns the resource action with the primary key or returns <code>null</code> if it could not be found. 253 * 254 * @param resourceActionId the primary key of the resource action 255 * @return the resource action, or <code>null</code> if a resource action with the primary key could not be found 256 */ 257 public ResourceAction fetchByPrimaryKey(long resourceActionId); 258 259 @Override 260 public java.util.Map<java.io.Serializable, ResourceAction> fetchByPrimaryKeys( 261 java.util.Set<java.io.Serializable> primaryKeys); 262 263 /** 264 * Returns all the resource actions. 265 * 266 * @return the resource actions 267 */ 268 public java.util.List<ResourceAction> findAll(); 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 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. 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 */ 281 public java.util.List<ResourceAction> findAll(int start, int end); 282 283 /** 284 * Returns an ordered range of all the resource actions. 285 * 286 * <p> 287 * 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. 288 * </p> 289 * 290 * @param start the lower bound of the range of resource actions 291 * @param end the upper bound of the range of resource actions (not inclusive) 292 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 293 * @return the ordered range of resource actions 294 */ 295 public java.util.List<ResourceAction> findAll(int start, int end, 296 com.liferay.portal.kernel.util.OrderByComparator<ResourceAction> orderByComparator); 297 298 /** 299 * Removes all the resource actions from the database. 300 */ 301 public void removeAll(); 302 303 /** 304 * Returns the number of resource actions. 305 * 306 * @return the number of resource actions 307 */ 308 public int countAll(); 309 }