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