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