001 /** 002 * Copyright (c) 2000-2010 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.model.LayoutSet; 018 019 /** 020 * The persistence interface for the layout set service. 021 * 022 * <p> 023 * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface. 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see LayoutSetPersistenceImpl 028 * @see LayoutSetUtil 029 * @generated 030 */ 031 public interface LayoutSetPersistence extends BasePersistence<LayoutSet> { 032 /** 033 * Caches the layout set in the entity cache if it is enabled. 034 * 035 * @param layoutSet the layout set to cache 036 */ 037 public void cacheResult(com.liferay.portal.model.LayoutSet layoutSet); 038 039 /** 040 * Caches the layout sets in the entity cache if it is enabled. 041 * 042 * @param layoutSets the layout sets to cache 043 */ 044 public void cacheResult( 045 java.util.List<com.liferay.portal.model.LayoutSet> layoutSets); 046 047 /** 048 * Creates a new layout set with the primary key. 049 * 050 * @param layoutSetId the primary key for the new layout set 051 * @return the new layout set 052 */ 053 public com.liferay.portal.model.LayoutSet create(long layoutSetId); 054 055 /** 056 * Removes the layout set with the primary key from the database. Also notifies the appropriate model listeners. 057 * 058 * @param layoutSetId the primary key of the layout set to remove 059 * @return the layout set that was removed 060 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 061 * @throws SystemException if a system exception occurred 062 */ 063 public com.liferay.portal.model.LayoutSet remove(long layoutSetId) 064 throws com.liferay.portal.NoSuchLayoutSetException, 065 com.liferay.portal.kernel.exception.SystemException; 066 067 public com.liferay.portal.model.LayoutSet updateImpl( 068 com.liferay.portal.model.LayoutSet layoutSet, boolean merge) 069 throws com.liferay.portal.kernel.exception.SystemException; 070 071 /** 072 * Finds the layout set with the primary key or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found. 073 * 074 * @param layoutSetId the primary key of the layout set to find 075 * @return the layout set 076 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 077 * @throws SystemException if a system exception occurred 078 */ 079 public com.liferay.portal.model.LayoutSet findByPrimaryKey(long layoutSetId) 080 throws com.liferay.portal.NoSuchLayoutSetException, 081 com.liferay.portal.kernel.exception.SystemException; 082 083 /** 084 * Finds the layout set with the primary key or returns <code>null</code> if it could not be found. 085 * 086 * @param layoutSetId the primary key of the layout set to find 087 * @return the layout set, or <code>null</code> if a layout set with the primary key could not be found 088 * @throws SystemException if a system exception occurred 089 */ 090 public com.liferay.portal.model.LayoutSet fetchByPrimaryKey( 091 long layoutSetId) 092 throws com.liferay.portal.kernel.exception.SystemException; 093 094 /** 095 * Finds all the layout sets where groupId = ?. 096 * 097 * @param groupId the group id to search with 098 * @return the matching layout sets 099 * @throws SystemException if a system exception occurred 100 */ 101 public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 102 long groupId) 103 throws com.liferay.portal.kernel.exception.SystemException; 104 105 /** 106 * Finds a range of all the layout sets where groupId = ?. 107 * 108 * <p> 109 * 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. 110 * </p> 111 * 112 * @param groupId the group id to search with 113 * @param start the lower bound of the range of layout sets to return 114 * @param end the upper bound of the range of layout sets to return (not inclusive) 115 * @return the range of matching layout sets 116 * @throws SystemException if a system exception occurred 117 */ 118 public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 119 long groupId, int start, int end) 120 throws com.liferay.portal.kernel.exception.SystemException; 121 122 /** 123 * Finds an ordered range of all the layout sets where groupId = ?. 124 * 125 * <p> 126 * 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. 127 * </p> 128 * 129 * @param groupId the group id to search with 130 * @param start the lower bound of the range of layout sets to return 131 * @param end the upper bound of the range of layout sets to return (not inclusive) 132 * @param orderByComparator the comparator to order the results by 133 * @return the ordered range of matching layout sets 134 * @throws SystemException if a system exception occurred 135 */ 136 public java.util.List<com.liferay.portal.model.LayoutSet> findByGroupId( 137 long groupId, int start, int end, 138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 139 throws com.liferay.portal.kernel.exception.SystemException; 140 141 /** 142 * Finds the first layout set in the ordered set where groupId = ?. 143 * 144 * <p> 145 * 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. 146 * </p> 147 * 148 * @param groupId the group id to search with 149 * @param orderByComparator the comparator to order the set by 150 * @return the first matching layout set 151 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 152 * @throws SystemException if a system exception occurred 153 */ 154 public com.liferay.portal.model.LayoutSet findByGroupId_First( 155 long groupId, 156 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 157 throws com.liferay.portal.NoSuchLayoutSetException, 158 com.liferay.portal.kernel.exception.SystemException; 159 160 /** 161 * Finds the last layout set in the ordered set where groupId = ?. 162 * 163 * <p> 164 * 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. 165 * </p> 166 * 167 * @param groupId the group id to search with 168 * @param orderByComparator the comparator to order the set by 169 * @return the last matching layout set 170 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 171 * @throws SystemException if a system exception occurred 172 */ 173 public com.liferay.portal.model.LayoutSet findByGroupId_Last(long groupId, 174 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 175 throws com.liferay.portal.NoSuchLayoutSetException, 176 com.liferay.portal.kernel.exception.SystemException; 177 178 /** 179 * Finds the layout sets before and after the current layout set in the ordered set where groupId = ?. 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 com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. 183 * </p> 184 * 185 * @param layoutSetId the primary key of the current layout set 186 * @param groupId the group id to search with 187 * @param orderByComparator the comparator to order the set by 188 * @return the previous, current, and next layout set 189 * @throws com.liferay.portal.NoSuchLayoutSetException if a layout set with the primary key could not be found 190 * @throws SystemException if a system exception occurred 191 */ 192 public com.liferay.portal.model.LayoutSet[] findByGroupId_PrevAndNext( 193 long layoutSetId, long groupId, 194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 195 throws com.liferay.portal.NoSuchLayoutSetException, 196 com.liferay.portal.kernel.exception.SystemException; 197 198 /** 199 * Finds the layout set where virtualHost = ? or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found. 200 * 201 * @param virtualHost the virtual host to search with 202 * @return the matching layout set 203 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 204 * @throws SystemException if a system exception occurred 205 */ 206 public com.liferay.portal.model.LayoutSet findByVirtualHost( 207 java.lang.String virtualHost) 208 throws com.liferay.portal.NoSuchLayoutSetException, 209 com.liferay.portal.kernel.exception.SystemException; 210 211 /** 212 * Finds the layout set where virtualHost = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 213 * 214 * @param virtualHost the virtual host to search with 215 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 216 * @throws SystemException if a system exception occurred 217 */ 218 public com.liferay.portal.model.LayoutSet fetchByVirtualHost( 219 java.lang.String virtualHost) 220 throws com.liferay.portal.kernel.exception.SystemException; 221 222 /** 223 * Finds the layout set where virtualHost = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 224 * 225 * @param virtualHost the virtual host to search with 226 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 227 * @throws SystemException if a system exception occurred 228 */ 229 public com.liferay.portal.model.LayoutSet fetchByVirtualHost( 230 java.lang.String virtualHost, boolean retrieveFromCache) 231 throws com.liferay.portal.kernel.exception.SystemException; 232 233 /** 234 * Finds the layout set where groupId = ? and privateLayout = ? or throws a {@link com.liferay.portal.NoSuchLayoutSetException} if it could not be found. 235 * 236 * @param groupId the group id to search with 237 * @param privateLayout the private layout to search with 238 * @return the matching layout set 239 * @throws com.liferay.portal.NoSuchLayoutSetException if a matching layout set could not be found 240 * @throws SystemException if a system exception occurred 241 */ 242 public com.liferay.portal.model.LayoutSet findByG_P(long groupId, 243 boolean privateLayout) 244 throws com.liferay.portal.NoSuchLayoutSetException, 245 com.liferay.portal.kernel.exception.SystemException; 246 247 /** 248 * Finds the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 249 * 250 * @param groupId the group id to search with 251 * @param privateLayout the private layout to search with 252 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId, 256 boolean privateLayout) 257 throws com.liferay.portal.kernel.exception.SystemException; 258 259 /** 260 * Finds the layout set where groupId = ? and privateLayout = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 261 * 262 * @param groupId the group id to search with 263 * @param privateLayout the private layout to search with 264 * @return the matching layout set, or <code>null</code> if a matching layout set could not be found 265 * @throws SystemException if a system exception occurred 266 */ 267 public com.liferay.portal.model.LayoutSet fetchByG_P(long groupId, 268 boolean privateLayout, boolean retrieveFromCache) 269 throws com.liferay.portal.kernel.exception.SystemException; 270 271 /** 272 * Finds all the layout sets. 273 * 274 * @return the layout sets 275 * @throws SystemException if a system exception occurred 276 */ 277 public java.util.List<com.liferay.portal.model.LayoutSet> findAll() 278 throws com.liferay.portal.kernel.exception.SystemException; 279 280 /** 281 * Finds a range of all the layout sets. 282 * 283 * <p> 284 * 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. 285 * </p> 286 * 287 * @param start the lower bound of the range of layout sets to return 288 * @param end the upper bound of the range of layout sets to return (not inclusive) 289 * @return the range of layout sets 290 * @throws SystemException if a system exception occurred 291 */ 292 public java.util.List<com.liferay.portal.model.LayoutSet> findAll( 293 int start, int end) 294 throws com.liferay.portal.kernel.exception.SystemException; 295 296 /** 297 * Finds an ordered range of all the layout sets. 298 * 299 * <p> 300 * 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. 301 * </p> 302 * 303 * @param start the lower bound of the range of layout sets to return 304 * @param end the upper bound of the range of layout sets to return (not inclusive) 305 * @param orderByComparator the comparator to order the results by 306 * @return the ordered range of layout sets 307 * @throws SystemException if a system exception occurred 308 */ 309 public java.util.List<com.liferay.portal.model.LayoutSet> findAll( 310 int start, int end, 311 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 312 throws com.liferay.portal.kernel.exception.SystemException; 313 314 /** 315 * Removes all the layout sets where groupId = ? from the database. 316 * 317 * @param groupId the group id to search with 318 * @throws SystemException if a system exception occurred 319 */ 320 public void removeByGroupId(long groupId) 321 throws com.liferay.portal.kernel.exception.SystemException; 322 323 /** 324 * Removes the layout set where virtualHost = ? from the database. 325 * 326 * @param virtualHost the virtual host to search with 327 * @throws SystemException if a system exception occurred 328 */ 329 public void removeByVirtualHost(java.lang.String virtualHost) 330 throws com.liferay.portal.NoSuchLayoutSetException, 331 com.liferay.portal.kernel.exception.SystemException; 332 333 /** 334 * Removes the layout set where groupId = ? and privateLayout = ? from the database. 335 * 336 * @param groupId the group id to search with 337 * @param privateLayout the private layout to search with 338 * @throws SystemException if a system exception occurred 339 */ 340 public void removeByG_P(long groupId, boolean privateLayout) 341 throws com.liferay.portal.NoSuchLayoutSetException, 342 com.liferay.portal.kernel.exception.SystemException; 343 344 /** 345 * Removes all the layout sets from the database. 346 * 347 * @throws SystemException if a system exception occurred 348 */ 349 public void removeAll() 350 throws com.liferay.portal.kernel.exception.SystemException; 351 352 /** 353 * Counts all the layout sets where groupId = ?. 354 * 355 * @param groupId the group id to search with 356 * @return the number of matching layout sets 357 * @throws SystemException if a system exception occurred 358 */ 359 public int countByGroupId(long groupId) 360 throws com.liferay.portal.kernel.exception.SystemException; 361 362 /** 363 * Counts all the layout sets where virtualHost = ?. 364 * 365 * @param virtualHost the virtual host to search with 366 * @return the number of matching layout sets 367 * @throws SystemException if a system exception occurred 368 */ 369 public int countByVirtualHost(java.lang.String virtualHost) 370 throws com.liferay.portal.kernel.exception.SystemException; 371 372 /** 373 * Counts all the layout sets where groupId = ? and privateLayout = ?. 374 * 375 * @param groupId the group id to search with 376 * @param privateLayout the private layout to search with 377 * @return the number of matching layout sets 378 * @throws SystemException if a system exception occurred 379 */ 380 public int countByG_P(long groupId, boolean privateLayout) 381 throws com.liferay.portal.kernel.exception.SystemException; 382 383 /** 384 * Counts all the layout sets. 385 * 386 * @return the number of layout sets 387 * @throws SystemException if a system exception occurred 388 */ 389 public int countAll() 390 throws com.liferay.portal.kernel.exception.SystemException; 391 }