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 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 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 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 * Returns 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 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 * Returns 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 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 * Returns all the expando tables where companyId = ? and classNameId = ?. 108 * 109 * @param companyId the company ID 110 * @param classNameId the class name ID 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 * Returns 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 126 * @param classNameId the class name ID 127 * @param start the lower bound of the range of expando tables 128 * @param end the upper bound of the range of expando tables (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 * Returns 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 144 * @param classNameId the class name ID 145 * @param start the lower bound of the range of expando tables 146 * @param end the upper bound of the range of expando tables (not inclusive) 147 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 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 * Returns 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 164 * @param classNameId the class name ID 165 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 184 * @param classNameId the class name ID 185 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * Returns 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 205 * @param classNameId the class name ID 206 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 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 * 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. 219 * 220 * @param companyId the company ID 221 * @param classNameId the class name ID 222 * @param name the name 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 * 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. 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, 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 * 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. 247 * 248 * @param companyId the company ID 249 * @param classNameId the class name ID 250 * @param name the name 251 * @param retrieveFromCache whether to use the finder cache 252 * @return the matching expando table, or <code>null</code> if a matching expando table could not be found 253 * @throws SystemException if a system exception occurred 254 */ 255 public com.liferay.portlet.expando.model.ExpandoTable fetchByC_C_N( 256 long companyId, long classNameId, java.lang.String name, 257 boolean retrieveFromCache) 258 throws com.liferay.portal.kernel.exception.SystemException; 259 260 /** 261 * Returns all the expando tables. 262 * 263 * @return the expando tables 264 * @throws SystemException if a system exception occurred 265 */ 266 public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll() 267 throws com.liferay.portal.kernel.exception.SystemException; 268 269 /** 270 * Returns a range of all the expando tables. 271 * 272 * <p> 273 * 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. 274 * </p> 275 * 276 * @param start the lower bound of the range of expando tables 277 * @param end the upper bound of the range of expando tables (not inclusive) 278 * @return the range of expando tables 279 * @throws SystemException if a system exception occurred 280 */ 281 public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll( 282 int start, int end) 283 throws com.liferay.portal.kernel.exception.SystemException; 284 285 /** 286 * Returns an ordered range of all the expando tables. 287 * 288 * <p> 289 * 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. 290 * </p> 291 * 292 * @param start the lower bound of the range of expando tables 293 * @param end the upper bound of the range of expando tables (not inclusive) 294 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 295 * @return the ordered range of expando tables 296 * @throws SystemException if a system exception occurred 297 */ 298 public java.util.List<com.liferay.portlet.expando.model.ExpandoTable> findAll( 299 int start, int end, 300 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 301 throws com.liferay.portal.kernel.exception.SystemException; 302 303 /** 304 * Removes all the expando tables where companyId = ? and classNameId = ? from the database. 305 * 306 * @param companyId the company ID 307 * @param classNameId the class name ID 308 * @throws SystemException if a system exception occurred 309 */ 310 public void removeByC_C(long companyId, long classNameId) 311 throws com.liferay.portal.kernel.exception.SystemException; 312 313 /** 314 * Removes the expando table where companyId = ? and classNameId = ? and name = ? from the database. 315 * 316 * @param companyId the company ID 317 * @param classNameId the class name ID 318 * @param name the name 319 * @throws SystemException if a system exception occurred 320 */ 321 public void removeByC_C_N(long companyId, long classNameId, 322 java.lang.String name) 323 throws com.liferay.portal.kernel.exception.SystemException, 324 com.liferay.portlet.expando.NoSuchTableException; 325 326 /** 327 * Removes all the expando tables from the database. 328 * 329 * @throws SystemException if a system exception occurred 330 */ 331 public void removeAll() 332 throws com.liferay.portal.kernel.exception.SystemException; 333 334 /** 335 * Returns the number of expando tables where companyId = ? and classNameId = ?. 336 * 337 * @param companyId the company ID 338 * @param classNameId the class name ID 339 * @return the number of matching expando tables 340 * @throws SystemException if a system exception occurred 341 */ 342 public int countByC_C(long companyId, long classNameId) 343 throws com.liferay.portal.kernel.exception.SystemException; 344 345 /** 346 * Returns the number of expando tables where companyId = ? and classNameId = ? and name = ?. 347 * 348 * @param companyId the company ID 349 * @param classNameId the class name ID 350 * @param name the name 351 * @return the number of matching expando tables 352 * @throws SystemException if a system exception occurred 353 */ 354 public int countByC_C_N(long companyId, long classNameId, 355 java.lang.String name) 356 throws com.liferay.portal.kernel.exception.SystemException; 357 358 /** 359 * Returns the number of expando tables. 360 * 361 * @return the number of expando tables 362 * @throws SystemException if a system exception occurred 363 */ 364 public int countAll() 365 throws com.liferay.portal.kernel.exception.SystemException; 366 367 public ExpandoTable remove(ExpandoTable expandoTable) 368 throws SystemException; 369 }