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