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