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