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.portal.service.persistence; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.model.ListType; 020 021 /** 022 * The persistence interface for the list type service. 023 * 024 * <p> 025 * Caching information and settings can be found in <code>portal.properties</code> 026 * </p> 027 * 028 * @author Brian Wing Shun Chan 029 * @see com.liferay.portal.service.persistence.impl.ListTypePersistenceImpl 030 * @see ListTypeUtil 031 * @generated 032 */ 033 @ProviderType 034 public interface ListTypePersistence extends BasePersistence<ListType> { 035 /* 036 * NOTE FOR DEVELOPERS: 037 * 038 * Never modify or reference this interface directly. Always use {@link ListTypeUtil} to access the list type persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface. 039 */ 040 041 /** 042 * Returns all the list types where type = ?. 043 * 044 * @param type the type 045 * @return the matching list types 046 */ 047 public java.util.List<ListType> findByType(java.lang.String type); 048 049 /** 050 * Returns a range of all the list types where type = ?. 051 * 052 * <p> 053 * 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 ListTypeModelImpl}. 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. 054 * </p> 055 * 056 * @param type the type 057 * @param start the lower bound of the range of list types 058 * @param end the upper bound of the range of list types (not inclusive) 059 * @return the range of matching list types 060 */ 061 public java.util.List<ListType> findByType(java.lang.String type, 062 int start, int end); 063 064 /** 065 * Returns an ordered range of all the list types where type = ?. 066 * 067 * <p> 068 * 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 ListTypeModelImpl}. 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. 069 * </p> 070 * 071 * @param type the type 072 * @param start the lower bound of the range of list types 073 * @param end the upper bound of the range of list types (not inclusive) 074 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 075 * @return the ordered range of matching list types 076 */ 077 public java.util.List<ListType> findByType(java.lang.String type, 078 int start, int end, 079 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 080 081 /** 082 * Returns an ordered range of all the list types where type = ?. 083 * 084 * <p> 085 * 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 ListTypeModelImpl}. 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. 086 * </p> 087 * 088 * @param type the type 089 * @param start the lower bound of the range of list types 090 * @param end the upper bound of the range of list types (not inclusive) 091 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 092 * @param retrieveFromCache whether to retrieve from the finder cache 093 * @return the ordered range of matching list types 094 */ 095 public java.util.List<ListType> findByType(java.lang.String type, 096 int start, int end, 097 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator, 098 boolean retrieveFromCache); 099 100 /** 101 * Returns the first list type in the ordered set where type = ?. 102 * 103 * @param type the type 104 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 105 * @return the first matching list type 106 * @throws NoSuchListTypeException if a matching list type could not be found 107 */ 108 public ListType findByType_First(java.lang.String type, 109 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 110 throws com.liferay.portal.exception.NoSuchListTypeException; 111 112 /** 113 * Returns the first list type in the ordered set where type = ?. 114 * 115 * @param type the type 116 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 117 * @return the first matching list type, or <code>null</code> if a matching list type could not be found 118 */ 119 public ListType fetchByType_First(java.lang.String type, 120 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 121 122 /** 123 * Returns the last list type in the ordered set where type = ?. 124 * 125 * @param type the type 126 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 127 * @return the last matching list type 128 * @throws NoSuchListTypeException if a matching list type could not be found 129 */ 130 public ListType findByType_Last(java.lang.String type, 131 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 132 throws com.liferay.portal.exception.NoSuchListTypeException; 133 134 /** 135 * Returns the last list type in the ordered set where type = ?. 136 * 137 * @param type the type 138 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 139 * @return the last matching list type, or <code>null</code> if a matching list type could not be found 140 */ 141 public ListType fetchByType_Last(java.lang.String type, 142 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 143 144 /** 145 * Returns the list types before and after the current list type in the ordered set where type = ?. 146 * 147 * @param listTypeId the primary key of the current list type 148 * @param type the type 149 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 150 * @return the previous, current, and next list type 151 * @throws NoSuchListTypeException if a list type with the primary key could not be found 152 */ 153 public ListType[] findByType_PrevAndNext(long listTypeId, 154 java.lang.String type, 155 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 156 throws com.liferay.portal.exception.NoSuchListTypeException; 157 158 /** 159 * Removes all the list types where type = ? from the database. 160 * 161 * @param type the type 162 */ 163 public void removeByType(java.lang.String type); 164 165 /** 166 * Returns the number of list types where type = ?. 167 * 168 * @param type the type 169 * @return the number of matching list types 170 */ 171 public int countByType(java.lang.String type); 172 173 /** 174 * Returns the list type where name = ? and type = ? or throws a {@link NoSuchListTypeException} if it could not be found. 175 * 176 * @param name the name 177 * @param type the type 178 * @return the matching list type 179 * @throws NoSuchListTypeException if a matching list type could not be found 180 */ 181 public ListType findByN_T(java.lang.String name, java.lang.String type) 182 throws com.liferay.portal.exception.NoSuchListTypeException; 183 184 /** 185 * Returns the list type where name = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 186 * 187 * @param name the name 188 * @param type the type 189 * @return the matching list type, or <code>null</code> if a matching list type could not be found 190 */ 191 public ListType fetchByN_T(java.lang.String name, java.lang.String type); 192 193 /** 194 * Returns the list type where name = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 195 * 196 * @param name the name 197 * @param type the type 198 * @param retrieveFromCache whether to retrieve from the finder cache 199 * @return the matching list type, or <code>null</code> if a matching list type could not be found 200 */ 201 public ListType fetchByN_T(java.lang.String name, java.lang.String type, 202 boolean retrieveFromCache); 203 204 /** 205 * Removes the list type where name = ? and type = ? from the database. 206 * 207 * @param name the name 208 * @param type the type 209 * @return the list type that was removed 210 */ 211 public ListType removeByN_T(java.lang.String name, java.lang.String type) 212 throws com.liferay.portal.exception.NoSuchListTypeException; 213 214 /** 215 * Returns the number of list types where name = ? and type = ?. 216 * 217 * @param name the name 218 * @param type the type 219 * @return the number of matching list types 220 */ 221 public int countByN_T(java.lang.String name, java.lang.String type); 222 223 /** 224 * Caches the list type in the entity cache if it is enabled. 225 * 226 * @param listType the list type 227 */ 228 public void cacheResult(ListType listType); 229 230 /** 231 * Caches the list types in the entity cache if it is enabled. 232 * 233 * @param listTypes the list types 234 */ 235 public void cacheResult(java.util.List<ListType> listTypes); 236 237 /** 238 * Creates a new list type with the primary key. Does not add the list type to the database. 239 * 240 * @param listTypeId the primary key for the new list type 241 * @return the new list type 242 */ 243 public ListType create(long listTypeId); 244 245 /** 246 * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners. 247 * 248 * @param listTypeId the primary key of the list type 249 * @return the list type that was removed 250 * @throws NoSuchListTypeException if a list type with the primary key could not be found 251 */ 252 public ListType remove(long listTypeId) 253 throws com.liferay.portal.exception.NoSuchListTypeException; 254 255 public ListType updateImpl(ListType listType); 256 257 /** 258 * Returns the list type with the primary key or throws a {@link NoSuchListTypeException} if it could not be found. 259 * 260 * @param listTypeId the primary key of the list type 261 * @return the list type 262 * @throws NoSuchListTypeException if a list type with the primary key could not be found 263 */ 264 public ListType findByPrimaryKey(long listTypeId) 265 throws com.liferay.portal.exception.NoSuchListTypeException; 266 267 /** 268 * Returns the list type with the primary key or returns <code>null</code> if it could not be found. 269 * 270 * @param listTypeId the primary key of the list type 271 * @return the list type, or <code>null</code> if a list type with the primary key could not be found 272 */ 273 public ListType fetchByPrimaryKey(long listTypeId); 274 275 @Override 276 public java.util.Map<java.io.Serializable, ListType> fetchByPrimaryKeys( 277 java.util.Set<java.io.Serializable> primaryKeys); 278 279 /** 280 * Returns all the list types. 281 * 282 * @return the list types 283 */ 284 public java.util.List<ListType> findAll(); 285 286 /** 287 * Returns a range of all the list types. 288 * 289 * <p> 290 * 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 ListTypeModelImpl}. 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. 291 * </p> 292 * 293 * @param start the lower bound of the range of list types 294 * @param end the upper bound of the range of list types (not inclusive) 295 * @return the range of list types 296 */ 297 public java.util.List<ListType> findAll(int start, int end); 298 299 /** 300 * Returns an ordered range of all the list types. 301 * 302 * <p> 303 * 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 ListTypeModelImpl}. 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. 304 * </p> 305 * 306 * @param start the lower bound of the range of list types 307 * @param end the upper bound of the range of list types (not inclusive) 308 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 309 * @return the ordered range of list types 310 */ 311 public java.util.List<ListType> findAll(int start, int end, 312 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 313 314 /** 315 * Returns an ordered range of all the list types. 316 * 317 * <p> 318 * 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 ListTypeModelImpl}. 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. 319 * </p> 320 * 321 * @param start the lower bound of the range of list types 322 * @param end the upper bound of the range of list types (not inclusive) 323 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 324 * @param retrieveFromCache whether to retrieve from the finder cache 325 * @return the ordered range of list types 326 */ 327 public java.util.List<ListType> findAll(int start, int end, 328 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator, 329 boolean retrieveFromCache); 330 331 /** 332 * Removes all the list types from the database. 333 */ 334 public void removeAll(); 335 336 /** 337 * Returns the number of list types. 338 * 339 * @return the number of list types 340 */ 341 public int countAll(); 342 343 @Override 344 public java.util.Set<java.lang.String> getBadColumnNames(); 345 }