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.LayoutSet; 020 021 /** 022 * The persistence interface for the layout set 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.LayoutSetPersistenceImpl 030 * @see LayoutSetUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface LayoutSetPersistence extends BasePersistence<LayoutSet> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link LayoutSetUtil} to access the layout set persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the layout sets where groupId = ?. 043 * 044 * @param groupId the group ID 045 * @return the matching layout sets 046 */ 047 public java.util.List<LayoutSet> findByGroupId(long groupId); 048 049 /** 050 * Returns a range of all the layout sets where groupId = ?. 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 LayoutSetModelImpl}. 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 groupId the group ID 057 * @param start the lower bound of the range of layout sets 058 * @param end the upper bound of the range of layout sets (not inclusive) 059 * @return the range of matching layout sets 060 */ 061 public java.util.List<LayoutSet> findByGroupId(long groupId, int start, 062 int end); 063 064 /** 065 * Returns an ordered range of all the layout sets where groupId = ?. 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 LayoutSetModelImpl}. 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 groupId the group ID 072 * @param start the lower bound of the range of layout sets 073 * @param end the upper bound of the range of layout sets (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching layout sets 076 */ 077 public java.util.List<LayoutSet> findByGroupId(long groupId, int start, 078 int end, 079 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 080 081 /** 082 * Returns the first layout set in the ordered set where groupId = ?. 083 * 084 * @param groupId the group ID 085 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 086 * @return the first matching layout set 087 * @throws NoSuchLayoutSetException if a matching layout set could not be found 088 */ 089 public LayoutSet findByGroupId_First(long groupId, 090 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 091 throws com.liferay.portal.NoSuchLayoutSetException; 092 093 /** 094 * Returns the first layout set in the ordered set where groupId = ?. 095 * 096 * @param groupId the group ID 097 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 098 * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found 099 */ 100 public LayoutSet fetchByGroupId_First(long groupId, 101 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 102 103 /** 104 * Returns the last layout set in the ordered set where groupId = ?. 105 * 106 * @param groupId the group ID 107 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 108 * @return the last matching layout set 109 * @throws NoSuchLayoutSetException if a matching layout set could not be found 110 */ 111 public LayoutSet findByGroupId_Last(long groupId, 112 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 113 throws com.liferay.portal.NoSuchLayoutSetException; 114 115 /** 116 * Returns the last layout set in the ordered set where groupId = ?. 117 * 118 * @param groupId the group ID 119 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 120 * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found 121 */ 122 public LayoutSet fetchByGroupId_Last(long groupId, 123 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 124 125 /** 126 * Returns the layout sets before and after the current layout set in the ordered set where groupId = ?. 127 * 128 * @param layoutSetId the primary key of the current layout set 129 * @param groupId the group ID 130 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 131 * @return the previous, current, and next layout set 132 * @throws NoSuchLayoutSetException if a layout set with the primary key could not be found 133 */ 134 public LayoutSet[] findByGroupId_PrevAndNext(long layoutSetId, 135 long groupId, 136 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 137 throws com.liferay.portal.NoSuchLayoutSetException; 138 139 /** 140 * Removes all the layout sets where groupId = ? from the database. 141 * 142 * @param groupId the group ID 143 */ 144 public void removeByGroupId(long groupId); 145 146 /** 147 * Returns the number of layout sets where groupId = ?. 148 * 149 * @param groupId the group ID 150 * @return the number of matching layout sets 151 */ 152 public int countByGroupId(long groupId); 153 154 /** 155 * Returns all the layout sets where layoutSetPrototypeUuid = ?. 156 * 157 * @param layoutSetPrototypeUuid the layout set prototype uuid 158 * @return the matching layout sets 159 */ 160 public java.util.List<LayoutSet> findByLayoutSetPrototypeUuid( 161 java.lang.String layoutSetPrototypeUuid); 162 163 /** 164 * Returns a range of all the layout sets where layoutSetPrototypeUuid = ?. 165 * 166 * <p> 167 * 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 LayoutSetModelImpl}. 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. 168 * </p> 169 * 170 * @param layoutSetPrototypeUuid the layout set prototype uuid 171 * @param start the lower bound of the range of layout sets 172 * @param end the upper bound of the range of layout sets (not inclusive) 173 * @return the range of matching layout sets 174 */ 175 public java.util.List<LayoutSet> findByLayoutSetPrototypeUuid( 176 java.lang.String layoutSetPrototypeUuid, int start, int end); 177 178 /** 179 * Returns an ordered range of all the layout sets where layoutSetPrototypeUuid = ?. 180 * 181 * <p> 182 * 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 LayoutSetModelImpl}. 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. 183 * </p> 184 * 185 * @param layoutSetPrototypeUuid the layout set prototype uuid 186 * @param start the lower bound of the range of layout sets 187 * @param end the upper bound of the range of layout sets (not inclusive) 188 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 189 * @return the ordered range of matching layout sets 190 */ 191 public java.util.List<LayoutSet> findByLayoutSetPrototypeUuid( 192 java.lang.String layoutSetPrototypeUuid, int start, int end, 193 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 194 195 /** 196 * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = ?. 197 * 198 * @param layoutSetPrototypeUuid the layout set prototype uuid 199 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 200 * @return the first matching layout set 201 * @throws NoSuchLayoutSetException if a matching layout set could not be found 202 */ 203 public LayoutSet findByLayoutSetPrototypeUuid_First( 204 java.lang.String layoutSetPrototypeUuid, 205 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 206 throws com.liferay.portal.NoSuchLayoutSetException; 207 208 /** 209 * Returns the first layout set in the ordered set where layoutSetPrototypeUuid = ?. 210 * 211 * @param layoutSetPrototypeUuid the layout set prototype uuid 212 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 213 * @return the first matching layout set, or <code>null</code> if a matching layout set could not be found 214 */ 215 public LayoutSet fetchByLayoutSetPrototypeUuid_First( 216 java.lang.String layoutSetPrototypeUuid, 217 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 218 219 /** 220 * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = ?. 221 * 222 * @param layoutSetPrototypeUuid the layout set prototype uuid 223 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 224 * @return the last matching layout set 225 * @throws NoSuchLayoutSetException if a matching layout set could not be found 226 */ 227 public LayoutSet findByLayoutSetPrototypeUuid_Last( 228 java.lang.String layoutSetPrototypeUuid, 229 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 230 throws com.liferay.portal.NoSuchLayoutSetException; 231 232 /** 233 * Returns the last layout set in the ordered set where layoutSetPrototypeUuid = ?. 234 * 235 * @param layoutSetPrototypeUuid the layout set prototype uuid 236 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 237 * @return the last matching layout set, or <code>null</code> if a matching layout set could not be found 238 */ 239 public LayoutSet fetchByLayoutSetPrototypeUuid_Last( 240 java.lang.String layoutSetPrototypeUuid, 241 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 242 243 /** 244 * Returns the layout sets before and after the current layout set in the ordered set where layoutSetPrototypeUuid = ?. 245 * 246 * @param layoutSetId the primary key of the current layout set 247 * @param layoutSetPrototypeUuid the layout set prototype uuid 248 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 249 * @return the previous, current, and next layout set 250 * @throws NoSuchLayoutSetException if a layout set with the primary key could not be found 251 */ 252 public LayoutSet[] findByLayoutSetPrototypeUuid_PrevAndNext( 253 long layoutSetId, java.lang.String layoutSetPrototypeUuid, 254 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator) 255 throws com.liferay.portal.NoSuchLayoutSetException; 256 257 /** 258 * Removes all the layout sets where layoutSetPrototypeUuid = ? from the database. 259 * 260 * @param layoutSetPrototypeUuid the layout set prototype uuid 261 */ 262 public void removeByLayoutSetPrototypeUuid( 263 java.lang.String layoutSetPrototypeUuid); 264 265 /** 266 * Returns the number of layout sets where layoutSetPrototypeUuid = ?. 267 * 268 * @param layoutSetPrototypeUuid the layout set prototype uuid 269 * @return the number of matching layout sets 270 */ 271 public int countByLayoutSetPrototypeUuid( 272 java.lang.String layoutSetPrototypeUuid); 273 274 /** 275 * Returns the layout set where groupId = ? and privateLayout = ? or throws a {@link NoSuchLayoutSetException} if it could not be found. 276 * 277 * @param groupId the group ID 278 * @param privateLayout the private layout 279 * @return the matching layout set 280 * @throws NoSuchLayoutSetException if a matching layout set could not be found 281 */ 282 public LayoutSet findByG_P(long groupId, boolean privateLayout) 283 throws com.liferay.portal.NoSuchLayoutSetException; 284 285 /** 286 * Returns the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 287 * 288 * @param groupId the group ID 289 * @param privateLayout the private layout 290 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 291 */ 292 public LayoutSet fetchByG_P(long groupId, boolean privateLayout); 293 294 /** 295 * Returns the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 296 * 297 * @param groupId the group ID 298 * @param privateLayout the private layout 299 * @param retrieveFromCache whether to use the finder cache 300 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 301 */ 302 public LayoutSet fetchByG_P(long groupId, boolean privateLayout, 303 boolean retrieveFromCache); 304 305 /** 306 * Removes the layout set where groupId = ? and privateLayout = ? from the database. 307 * 308 * @param groupId the group ID 309 * @param privateLayout the private layout 310 * @return the layout set that was removed 311 */ 312 public LayoutSet removeByG_P(long groupId, boolean privateLayout) 313 throws com.liferay.portal.NoSuchLayoutSetException; 314 315 /** 316 * Returns the number of layout sets where groupId = ? and privateLayout = ?. 317 * 318 * @param groupId the group ID 319 * @param privateLayout the private layout 320 * @return the number of matching layout sets 321 */ 322 public int countByG_P(long groupId, boolean privateLayout); 323 324 /** 325 * Caches the layout set in the entity cache if it is enabled. 326 * 327 * @param layoutSet the layout set 328 */ 329 public void cacheResult(LayoutSet layoutSet); 330 331 /** 332 * Caches the layout sets in the entity cache if it is enabled. 333 * 334 * @param layoutSets the layout sets 335 */ 336 public void cacheResult(java.util.List<LayoutSet> layoutSets); 337 338 /** 339 * Creates a new layout set with the primary key. Does not add the layout set to the database. 340 * 341 * @param layoutSetId the primary key for the new layout set 342 * @return the new layout set 343 */ 344 public LayoutSet create(long layoutSetId); 345 346 /** 347 * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners. 348 * 349 * @param layoutSetId the primary key of the layout set 350 * @return the layout set that was removed 351 * @throws NoSuchLayoutSetException if a layout set with the primary key could not be found 352 */ 353 public LayoutSet remove(long layoutSetId) 354 throws com.liferay.portal.NoSuchLayoutSetException; 355 356 public LayoutSet updateImpl(LayoutSet layoutSet); 357 358 /** 359 * Returns the layout set with the primary key or throws a {@link NoSuchLayoutSetException} if it could not be found. 360 * 361 * @param layoutSetId the primary key of the layout set 362 * @return the layout set 363 * @throws NoSuchLayoutSetException if a layout set with the primary key could not be found 364 */ 365 public LayoutSet findByPrimaryKey(long layoutSetId) 366 throws com.liferay.portal.NoSuchLayoutSetException; 367 368 /** 369 * Returns the layout set with the primary key or returns <code>null</code> if it could not be found. 370 * 371 * @param layoutSetId the primary key of the layout set 372 * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found 373 */ 374 public LayoutSet fetchByPrimaryKey(long layoutSetId); 375 376 @Override 377 public java.util.Map<java.io.Serializable, LayoutSet> fetchByPrimaryKeys( 378 java.util.Set<java.io.Serializable> primaryKeys); 379 380 /** 381 * Returns all the layout sets. 382 * 383 * @return the layout sets 384 */ 385 public java.util.List<LayoutSet> findAll(); 386 387 /** 388 * Returns a range of all the layout sets. 389 * 390 * <p> 391 * 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 LayoutSetModelImpl}. 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. 392 * </p> 393 * 394 * @param start the lower bound of the range of layout sets 395 * @param end the upper bound of the range of layout sets (not inclusive) 396 * @return the range of layout sets 397 */ 398 public java.util.List<LayoutSet> findAll(int start, int end); 399 400 /** 401 * Returns an ordered range of all the layout sets. 402 * 403 * <p> 404 * 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 LayoutSetModelImpl}. 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. 405 * </p> 406 * 407 * @param start the lower bound of the range of layout sets 408 * @param end the upper bound of the range of layout sets (not inclusive) 409 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 410 * @return the ordered range of layout sets 411 */ 412 public java.util.List<LayoutSet> findAll(int start, int end, 413 com.liferay.portal.kernel.util.OrderByComparator<LayoutSet> orderByComparator); 414 415 /** 416 * Removes all the layout sets from the database. 417 */ 418 public void removeAll(); 419 420 /** 421 * Returns the number of layout sets. 422 * 423 * @return the number of layout sets 424 */ 425 public int countAll(); 426 }