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