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