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