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