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 the first expando table in the ordered set where companyId = ? and classNameId = ?. 089 * 090 * @param companyId the company ID 091 * @param classNameId the class name ID 092 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 093 * @return the first matching expando table 094 * @throws NoSuchTableException if a matching expando table could not be found 095 */ 096 public ExpandoTable findByC_C_First(long companyId, long classNameId, 097 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator) 098 throws com.liferay.portlet.expando.NoSuchTableException; 099 100 /** 101 * Returns the first expando table in the ordered set where companyId = ? and classNameId = ?. 102 * 103 * @param companyId the company ID 104 * @param classNameId the class name ID 105 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 106 * @return the first matching expando table, or <code>null</code> if a matching expando table could not be found 107 */ 108 public ExpandoTable fetchByC_C_First(long companyId, long classNameId, 109 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator); 110 111 /** 112 * Returns the last expando table in the ordered set where companyId = ? and classNameId = ?. 113 * 114 * @param companyId the company ID 115 * @param classNameId the class name ID 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the last matching expando table 118 * @throws NoSuchTableException if a matching expando table could not be found 119 */ 120 public ExpandoTable findByC_C_Last(long companyId, long classNameId, 121 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator) 122 throws com.liferay.portlet.expando.NoSuchTableException; 123 124 /** 125 * Returns the last expando table in the ordered set where companyId = ? and classNameId = ?. 126 * 127 * @param companyId the company ID 128 * @param classNameId the class name ID 129 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 130 * @return the last matching expando table, or <code>null</code> if a matching expando table could not be found 131 */ 132 public ExpandoTable fetchByC_C_Last(long companyId, long classNameId, 133 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator); 134 135 /** 136 * Returns the expando tables before and after the current expando table in the ordered set where companyId = ? and classNameId = ?. 137 * 138 * @param tableId the primary key of the current expando table 139 * @param companyId the company ID 140 * @param classNameId the class name ID 141 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 142 * @return the previous, current, and next expando table 143 * @throws NoSuchTableException if a expando table with the primary key could not be found 144 */ 145 public ExpandoTable[] findByC_C_PrevAndNext(long tableId, long companyId, 146 long classNameId, 147 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator) 148 throws com.liferay.portlet.expando.NoSuchTableException; 149 150 /** 151 * Removes all the expando tables where companyId = ? and classNameId = ? from the database. 152 * 153 * @param companyId the company ID 154 * @param classNameId the class name ID 155 */ 156 public void removeByC_C(long companyId, long classNameId); 157 158 /** 159 * Returns the number of expando tables where companyId = ? and classNameId = ?. 160 * 161 * @param companyId the company ID 162 * @param classNameId the class name ID 163 * @return the number of matching expando tables 164 */ 165 public int countByC_C(long companyId, long classNameId); 166 167 /** 168 * Returns the expando table where companyId = ? and classNameId = ? and name = ? or throws a {@link NoSuchTableException} if it could not be found. 169 * 170 * @param companyId the company ID 171 * @param classNameId the class name ID 172 * @param name the name 173 * @return the matching expando table 174 * @throws NoSuchTableException if a matching expando table could not be found 175 */ 176 public ExpandoTable findByC_C_N(long companyId, long classNameId, 177 java.lang.String name) 178 throws com.liferay.portlet.expando.NoSuchTableException; 179 180 /** 181 * 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. 182 * 183 * @param companyId the company ID 184 * @param classNameId the class name ID 185 * @param name the name 186 * @return the matching expando table, or <code>null</code> if a matching expando table could not be found 187 */ 188 public ExpandoTable fetchByC_C_N(long companyId, long classNameId, 189 java.lang.String name); 190 191 /** 192 * 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. 193 * 194 * @param companyId the company ID 195 * @param classNameId the class name ID 196 * @param name the name 197 * @param retrieveFromCache whether to use the finder cache 198 * @return the matching expando table, or <code>null</code> if a matching expando table could not be found 199 */ 200 public ExpandoTable fetchByC_C_N(long companyId, long classNameId, 201 java.lang.String name, boolean retrieveFromCache); 202 203 /** 204 * Removes the expando table where companyId = ? and classNameId = ? and name = ? from the database. 205 * 206 * @param companyId the company ID 207 * @param classNameId the class name ID 208 * @param name the name 209 * @return the expando table that was removed 210 */ 211 public ExpandoTable removeByC_C_N(long companyId, long classNameId, 212 java.lang.String name) 213 throws com.liferay.portlet.expando.NoSuchTableException; 214 215 /** 216 * Returns the number of expando tables where companyId = ? and classNameId = ? and name = ?. 217 * 218 * @param companyId the company ID 219 * @param classNameId the class name ID 220 * @param name the name 221 * @return the number of matching expando tables 222 */ 223 public int countByC_C_N(long companyId, long classNameId, 224 java.lang.String name); 225 226 /** 227 * Caches the expando table in the entity cache if it is enabled. 228 * 229 * @param expandoTable the expando table 230 */ 231 public void cacheResult(ExpandoTable expandoTable); 232 233 /** 234 * Caches the expando tables in the entity cache if it is enabled. 235 * 236 * @param expandoTables the expando tables 237 */ 238 public void cacheResult(java.util.List<ExpandoTable> expandoTables); 239 240 /** 241 * Creates a new expando table with the primary key. Does not add the expando table to the database. 242 * 243 * @param tableId the primary key for the new expando table 244 * @return the new expando table 245 */ 246 public ExpandoTable create(long tableId); 247 248 /** 249 * Removes the expando table with the primary key from the database. Also notifies the appropriate model listeners. 250 * 251 * @param tableId the primary key of the expando table 252 * @return the expando table that was removed 253 * @throws NoSuchTableException if a expando table with the primary key could not be found 254 */ 255 public ExpandoTable remove(long tableId) 256 throws com.liferay.portlet.expando.NoSuchTableException; 257 258 public ExpandoTable updateImpl(ExpandoTable expandoTable); 259 260 /** 261 * Returns the expando table with the primary key or throws a {@link NoSuchTableException} if it could not be found. 262 * 263 * @param tableId the primary key of the expando table 264 * @return the expando table 265 * @throws NoSuchTableException if a expando table with the primary key could not be found 266 */ 267 public ExpandoTable findByPrimaryKey(long tableId) 268 throws com.liferay.portlet.expando.NoSuchTableException; 269 270 /** 271 * Returns the expando table with the primary key or returns <code>null</code> if it could not be found. 272 * 273 * @param tableId the primary key of the expando table 274 * @return the expando table, or <code>null</code> if a expando table with the primary key could not be found 275 */ 276 public ExpandoTable fetchByPrimaryKey(long tableId); 277 278 @Override 279 public java.util.Map<java.io.Serializable, ExpandoTable> fetchByPrimaryKeys( 280 java.util.Set<java.io.Serializable> primaryKeys); 281 282 /** 283 * Returns all the expando tables. 284 * 285 * @return the expando tables 286 */ 287 public java.util.List<ExpandoTable> findAll(); 288 289 /** 290 * Returns a range of all the expando tables. 291 * 292 * <p> 293 * 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. 294 * </p> 295 * 296 * @param start the lower bound of the range of expando tables 297 * @param end the upper bound of the range of expando tables (not inclusive) 298 * @return the range of expando tables 299 */ 300 public java.util.List<ExpandoTable> findAll(int start, int end); 301 302 /** 303 * Returns an ordered range of all the expando tables. 304 * 305 * <p> 306 * 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. 307 * </p> 308 * 309 * @param start the lower bound of the range of expando tables 310 * @param end the upper bound of the range of expando tables (not inclusive) 311 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 312 * @return the ordered range of expando tables 313 */ 314 public java.util.List<ExpandoTable> findAll(int start, int end, 315 com.liferay.portal.kernel.util.OrderByComparator<ExpandoTable> orderByComparator); 316 317 /** 318 * Removes all the expando tables from the database. 319 */ 320 public void removeAll(); 321 322 /** 323 * Returns the number of expando tables. 324 * 325 * @return the number of expando tables 326 */ 327 public int countAll(); 328 }