001 /** 002 * Copyright (c) 2000-2012 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 com.liferay.portal.model.ListType; 018 019 /** 020 * The persistence interface for the list type service. 021 * 022 * <p> 023 * Caching information and settings can be found in <code>portal.properties</code> 024 * </p> 025 * 026 * @author Brian Wing Shun Chan 027 * @see ListTypePersistenceImpl 028 * @see ListTypeUtil 029 * @generated 030 */ 031 public interface ListTypePersistence extends BasePersistence<ListType> { 032 /* 033 * NOTE FOR DEVELOPERS: 034 * 035 * 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. 036 */ 037 038 /** 039 * Returns all the list types where type = ?. 040 * 041 * @param type the type 042 * @return the matching list types 043 * @throws SystemException if a system exception occurred 044 */ 045 public java.util.List<com.liferay.portal.model.ListType> findByType( 046 java.lang.String type) 047 throws com.liferay.portal.kernel.exception.SystemException; 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 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.portal.model.impl.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 * @throws SystemException if a system exception occurred 061 */ 062 public java.util.List<com.liferay.portal.model.ListType> findByType( 063 java.lang.String type, int start, int end) 064 throws com.liferay.portal.kernel.exception.SystemException; 065 066 /** 067 * Returns an ordered range of all the list types where type = ?. 068 * 069 * <p> 070 * 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.portal.model.impl.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. 071 * </p> 072 * 073 * @param type the type 074 * @param start the lower bound of the range of list types 075 * @param end the upper bound of the range of list types (not inclusive) 076 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 077 * @return the ordered range of matching list types 078 * @throws SystemException if a system exception occurred 079 */ 080 public java.util.List<com.liferay.portal.model.ListType> findByType( 081 java.lang.String type, int start, int end, 082 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 083 throws com.liferay.portal.kernel.exception.SystemException; 084 085 /** 086 * Returns the first list type in the ordered set where type = ?. 087 * 088 * @param type the type 089 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 090 * @return the first matching list type 091 * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found 092 * @throws SystemException if a system exception occurred 093 */ 094 public com.liferay.portal.model.ListType findByType_First( 095 java.lang.String type, 096 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 097 throws com.liferay.portal.NoSuchListTypeException, 098 com.liferay.portal.kernel.exception.SystemException; 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, or <code>null</code> if a matching list type could not be found 106 * @throws SystemException if a system exception occurred 107 */ 108 public com.liferay.portal.model.ListType fetchByType_First( 109 java.lang.String type, 110 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 111 throws com.liferay.portal.kernel.exception.SystemException; 112 113 /** 114 * Returns the last 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 last matching list type 119 * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found 120 * @throws SystemException if a system exception occurred 121 */ 122 public com.liferay.portal.model.ListType findByType_Last( 123 java.lang.String type, 124 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 125 throws com.liferay.portal.NoSuchListTypeException, 126 com.liferay.portal.kernel.exception.SystemException; 127 128 /** 129 * Returns the last list type in the ordered set where type = ?. 130 * 131 * @param type the type 132 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 133 * @return the last matching list type, or <code>null</code> if a matching list type could not be found 134 * @throws SystemException if a system exception occurred 135 */ 136 public com.liferay.portal.model.ListType fetchByType_Last( 137 java.lang.String type, 138 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 139 throws com.liferay.portal.kernel.exception.SystemException; 140 141 /** 142 * Returns the list types before and after the current list type in the ordered set where type = ?. 143 * 144 * @param listTypeId the primary key of the current list type 145 * @param type the type 146 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) 147 * @return the previous, current, and next list type 148 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 149 * @throws SystemException if a system exception occurred 150 */ 151 public com.liferay.portal.model.ListType[] findByType_PrevAndNext( 152 int listTypeId, java.lang.String type, 153 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 154 throws com.liferay.portal.NoSuchListTypeException, 155 com.liferay.portal.kernel.exception.SystemException; 156 157 /** 158 * Removes all the list types where type = ? from the database. 159 * 160 * @param type the type 161 * @throws SystemException if a system exception occurred 162 */ 163 public void removeByType(java.lang.String type) 164 throws com.liferay.portal.kernel.exception.SystemException; 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 * @throws SystemException if a system exception occurred 172 */ 173 public int countByType(java.lang.String type) 174 throws com.liferay.portal.kernel.exception.SystemException; 175 176 /** 177 * Caches the list type in the entity cache if it is enabled. 178 * 179 * @param listType the list type 180 */ 181 public void cacheResult(com.liferay.portal.model.ListType listType); 182 183 /** 184 * Caches the list types in the entity cache if it is enabled. 185 * 186 * @param listTypes the list types 187 */ 188 public void cacheResult( 189 java.util.List<com.liferay.portal.model.ListType> listTypes); 190 191 /** 192 * Creates a new list type with the primary key. Does not add the list type to the database. 193 * 194 * @param listTypeId the primary key for the new list type 195 * @return the new list type 196 */ 197 public com.liferay.portal.model.ListType create(int listTypeId); 198 199 /** 200 * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners. 201 * 202 * @param listTypeId the primary key of the list type 203 * @return the list type that was removed 204 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 205 * @throws SystemException if a system exception occurred 206 */ 207 public com.liferay.portal.model.ListType remove(int listTypeId) 208 throws com.liferay.portal.NoSuchListTypeException, 209 com.liferay.portal.kernel.exception.SystemException; 210 211 public com.liferay.portal.model.ListType updateImpl( 212 com.liferay.portal.model.ListType listType) 213 throws com.liferay.portal.kernel.exception.SystemException; 214 215 /** 216 * Returns the list type with the primary key or throws a {@link com.liferay.portal.NoSuchListTypeException} if it could not be found. 217 * 218 * @param listTypeId the primary key of the list type 219 * @return the list type 220 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 221 * @throws SystemException if a system exception occurred 222 */ 223 public com.liferay.portal.model.ListType findByPrimaryKey(int listTypeId) 224 throws com.liferay.portal.NoSuchListTypeException, 225 com.liferay.portal.kernel.exception.SystemException; 226 227 /** 228 * Returns the list type with the primary key or returns <code>null</code> if it could not be found. 229 * 230 * @param listTypeId the primary key of the list type 231 * @return the list type, or <code>null</code> if a list type with the primary key could not be found 232 * @throws SystemException if a system exception occurred 233 */ 234 public com.liferay.portal.model.ListType fetchByPrimaryKey(int listTypeId) 235 throws com.liferay.portal.kernel.exception.SystemException; 236 237 /** 238 * Returns all the list types. 239 * 240 * @return the list types 241 * @throws SystemException if a system exception occurred 242 */ 243 public java.util.List<com.liferay.portal.model.ListType> findAll() 244 throws com.liferay.portal.kernel.exception.SystemException; 245 246 /** 247 * Returns a range of all the list types. 248 * 249 * <p> 250 * 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.portal.model.impl.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. 251 * </p> 252 * 253 * @param start the lower bound of the range of list types 254 * @param end the upper bound of the range of list types (not inclusive) 255 * @return the range of list types 256 * @throws SystemException if a system exception occurred 257 */ 258 public java.util.List<com.liferay.portal.model.ListType> findAll( 259 int start, int end) 260 throws com.liferay.portal.kernel.exception.SystemException; 261 262 /** 263 * Returns an ordered range of all the list types. 264 * 265 * <p> 266 * 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.portal.model.impl.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. 267 * </p> 268 * 269 * @param start the lower bound of the range of list types 270 * @param end the upper bound of the range of list types (not inclusive) 271 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 272 * @return the ordered range of list types 273 * @throws SystemException if a system exception occurred 274 */ 275 public java.util.List<com.liferay.portal.model.ListType> findAll( 276 int start, int end, 277 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 278 throws com.liferay.portal.kernel.exception.SystemException; 279 280 /** 281 * Removes all the list types from the database. 282 * 283 * @throws SystemException if a system exception occurred 284 */ 285 public void removeAll() 286 throws com.liferay.portal.kernel.exception.SystemException; 287 288 /** 289 * Returns the number of list types. 290 * 291 * @return the number of list types 292 * @throws SystemException if a system exception occurred 293 */ 294 public int countAll() 295 throws com.liferay.portal.kernel.exception.SystemException; 296 }