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