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.exception.NoSuchListTypeException; 020 import com.liferay.portal.model.ListType; 021 022 /** 023 * The persistence interface for the list type service. 024 * 025 * <p> 026 * Caching information and settings can be found in <code>portal.properties</code> 027 * </p> 028 * 029 * @author Brian Wing Shun Chan 030 * @see com.liferay.portal.service.persistence.impl.ListTypePersistenceImpl 031 * @see ListTypeUtil 032 * @generated 033 */ 034 @ProviderType 035 public interface ListTypePersistence extends BasePersistence<ListType> { 036 /* 037 * NOTE FOR DEVELOPERS: 038 * 039 * 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. 040 */ 041 042 /** 043 * Returns all the list types where type = ?. 044 * 045 * @param type the type 046 * @return the matching list types 047 */ 048 public java.util.List<ListType> findByType(java.lang.String type); 049 050 /** 051 * Returns a range of all the list types where type = ?. 052 * 053 * <p> 054 * 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. 055 * </p> 056 * 057 * @param type the type 058 * @param start the lower bound of the range of list types 059 * @param end the upper bound of the range of list types (not inclusive) 060 * @return the range of matching list types 061 */ 062 public java.util.List<ListType> findByType(java.lang.String type, 063 int start, int end); 064 065 /** 066 * Returns an ordered range of all the list types where type = ?. 067 * 068 * <p> 069 * 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. 070 * </p> 071 * 072 * @param type the type 073 * @param start the lower bound of the range of list types 074 * @param end the upper bound of the range of list types (not inclusive) 075 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 076 * @return the ordered range of matching list types 077 */ 078 public java.util.List<ListType> findByType(java.lang.String type, 079 int start, int end, 080 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 081 082 /** 083 * Returns an ordered range of all the list types where type = ?. 084 * 085 * <p> 086 * 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. 087 * </p> 088 * 089 * @param type the type 090 * @param start the lower bound of the range of list types 091 * @param end the upper bound of the range of list types (not inclusive) 092 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 093 * @param retrieveFromCache whether to retrieve from the finder cache 094 * @return the ordered range of matching list types 095 */ 096 public java.util.List<ListType> findByType(java.lang.String type, 097 int start, int end, 098 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator, 099 boolean retrieveFromCache); 100 101 /** 102 * Returns the first list type in the ordered set where type = ?. 103 * 104 * @param type the type 105 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 106 * @return the first matching list type 107 * @throws NoSuchListTypeException if a matching list type could not be found 108 */ 109 public ListType findByType_First(java.lang.String type, 110 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 111 throws NoSuchListTypeException; 112 113 /** 114 * Returns the first list type in the ordered set where type = ?. 115 * 116 * @param type the type 117 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 118 * @return the first matching list type, or <code>null</code> if a matching list type could not be found 119 */ 120 public ListType fetchByType_First(java.lang.String type, 121 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 122 123 /** 124 * Returns the last list type in the ordered set where type = ?. 125 * 126 * @param type the type 127 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 128 * @return the last matching list type 129 * @throws NoSuchListTypeException if a matching list type could not be found 130 */ 131 public ListType findByType_Last(java.lang.String type, 132 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 133 throws NoSuchListTypeException; 134 135 /** 136 * Returns the last list type in the ordered set where type = ?. 137 * 138 * @param type the type 139 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 140 * @return the last matching list type, or <code>null</code> if a matching list type could not be found 141 */ 142 public ListType fetchByType_Last(java.lang.String type, 143 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator); 144 145 /** 146 * Returns the list types before and after the current list type in the ordered set where type = ?. 147 * 148 * @param listTypeId the primary key of the current list type 149 * @param type the type 150 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 151 * @return the previous, current, and next list type 152 * @throws NoSuchListTypeException if a list type with the primary key could not be found 153 */ 154 public ListType[] findByType_PrevAndNext(long listTypeId, 155 java.lang.String type, 156 com.liferay.portal.kernel.util.OrderByComparator<ListType> orderByComparator) 157 throws NoSuchListTypeException; 158 159 /** 160 * Removes all the list types where type = ? from the database. 161 * 162 * @param type the type 163 */ 164 public void removeByType(java.lang.String type); 165 166 /** 167 * Returns the number of list types where type = ?. 168 * 169 * @param type the type 170 * @return the number of matching list types 171 */ 172 public int countByType(java.lang.String type); 173 174 /** 175 * Returns the list type where name = ? and type = ? or throws a {@link NoSuchListTypeException} if it could not be found. 176 * 177 * @param name the name 178 * @param type the type 179 * @return the matching list type 180 * @throws NoSuchListTypeException if a matching list type could not be found 181 */ 182 public ListType findByN_T(java.lang.String name, java.lang.String type) 183 throws NoSuchListTypeException; 184 185 /** 186 * Returns the list type where name = ? and type = ? or returns <code>null</code> if it could not be found. Uses the finder cache. 187 * 188 * @param name the name 189 * @param type the type 190 * @return the matching list type, or <code>null</code> if a matching list type could not be found 191 */ 192 public ListType fetchByN_T(java.lang.String name, java.lang.String type); 193 194 /** 195 * Returns the list type where name = ? and type = ? or returns <code>null</code> if it could not be found, optionally using the finder cache. 196 * 197 * @param name the name 198 * @param type the type 199 * @param retrieveFromCache whether to retrieve from the finder cache 200 * @return the matching list type, or <code>null</code> if a matching list type could not be found 201 */ 202 public ListType fetchByN_T(java.lang.String name, java.lang.String type, 203 boolean retrieveFromCache); 204 205 /** 206 * Removes the list type where name = ? and type = ? from the database. 207 * 208 * @param name the name 209 * @param type the type 210 * @return the list type that was removed 211 */ 212 public ListType removeByN_T(java.lang.String name, java.lang.String type) 213 throws NoSuchListTypeException; 214 215 /** 216 * Returns the number of list types where name = ? and type = ?. 217 * 218 * @param name the name 219 * @param type the type 220 * @return the number of matching list types 221 */ 222 public int countByN_T(java.lang.String name, java.lang.String type); 223 224 /** 225 * Caches the list type in the entity cache if it is enabled. 226 * 227 * @param listType the list type 228 */ 229 public void cacheResult(ListType listType); 230 231 /** 232 * Caches the list types in the entity cache if it is enabled. 233 * 234 * @param listTypes the list types 235 */ 236 public void cacheResult(java.util.List<ListType> listTypes); 237 238 /** 239 * Creates a new list type with the primary key. Does not add the list type to the database. 240 * 241 * @param listTypeId the primary key for the new list type 242 * @return the new list type 243 */ 244 public ListType create(long listTypeId); 245 246 /** 247 * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners. 248 * 249 * @param listTypeId the primary key of the list type 250 * @return the list type that was removed 251 * @throws NoSuchListTypeException if a list type with the primary key could not be found 252 */ 253 public ListType remove(long listTypeId) throws 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 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 }