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