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