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