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