001 /** 002 * Copyright (c) 2000-2010 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 * Never modify this interface directly. Modify <code>service.xml</code> and rerun ServiceBuilder to regnerate this interface. 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 * Caches the list type in the entity cache if it is enabled. 034 * 035 * @param listType the list type to cache 036 */ 037 public void cacheResult(com.liferay.portal.model.ListType listType); 038 039 /** 040 * Caches the list types in the entity cache if it is enabled. 041 * 042 * @param listTypes the list types to cache 043 */ 044 public void cacheResult( 045 java.util.List<com.liferay.portal.model.ListType> listTypes); 046 047 /** 048 * Creates a new list type with the primary key. 049 * 050 * @param listTypeId the primary key for the new list type 051 * @return the new list type 052 */ 053 public com.liferay.portal.model.ListType create(int listTypeId); 054 055 /** 056 * Removes the list type with the primary key from the database. Also notifies the appropriate model listeners. 057 * 058 * @param listTypeId the primary key of the list type to remove 059 * @return the list type that was removed 060 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 061 * @throws SystemException if a system exception occurred 062 */ 063 public com.liferay.portal.model.ListType remove(int listTypeId) 064 throws com.liferay.portal.NoSuchListTypeException, 065 com.liferay.portal.kernel.exception.SystemException; 066 067 public com.liferay.portal.model.ListType updateImpl( 068 com.liferay.portal.model.ListType listType, boolean merge) 069 throws com.liferay.portal.kernel.exception.SystemException; 070 071 /** 072 * Finds the list type with the primary key or throws a {@link com.liferay.portal.NoSuchListTypeException} if it could not be found. 073 * 074 * @param listTypeId the primary key of the list type to find 075 * @return the list type 076 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 077 * @throws SystemException if a system exception occurred 078 */ 079 public com.liferay.portal.model.ListType findByPrimaryKey(int listTypeId) 080 throws com.liferay.portal.NoSuchListTypeException, 081 com.liferay.portal.kernel.exception.SystemException; 082 083 /** 084 * Finds the list type with the primary key or returns <code>null</code> if it could not be found. 085 * 086 * @param listTypeId the primary key of the list type to find 087 * @return the list type, or <code>null</code> if a list type with the primary key could not be found 088 * @throws SystemException if a system exception occurred 089 */ 090 public com.liferay.portal.model.ListType fetchByPrimaryKey(int listTypeId) 091 throws com.liferay.portal.kernel.exception.SystemException; 092 093 /** 094 * Finds all the list types where type = ?. 095 * 096 * @param type the type to search with 097 * @return the matching list types 098 * @throws SystemException if a system exception occurred 099 */ 100 public java.util.List<com.liferay.portal.model.ListType> findByType( 101 java.lang.String type) 102 throws com.liferay.portal.kernel.exception.SystemException; 103 104 /** 105 * Finds a range of all the list types where type = ?. 106 * 107 * <p> 108 * 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. 109 * </p> 110 * 111 * @param type the type to search with 112 * @param start the lower bound of the range of list types to return 113 * @param end the upper bound of the range of list types to return (not inclusive) 114 * @return the range of matching list types 115 * @throws SystemException if a system exception occurred 116 */ 117 public java.util.List<com.liferay.portal.model.ListType> findByType( 118 java.lang.String type, int start, int end) 119 throws com.liferay.portal.kernel.exception.SystemException; 120 121 /** 122 * Finds an ordered range of all the list types where type = ?. 123 * 124 * <p> 125 * 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. 126 * </p> 127 * 128 * @param type the type to search with 129 * @param start the lower bound of the range of list types to return 130 * @param end the upper bound of the range of list types to return (not inclusive) 131 * @param orderByComparator the comparator to order the results by 132 * @return the ordered range of matching list types 133 * @throws SystemException if a system exception occurred 134 */ 135 public java.util.List<com.liferay.portal.model.ListType> findByType( 136 java.lang.String type, int start, int end, 137 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 138 throws com.liferay.portal.kernel.exception.SystemException; 139 140 /** 141 * Finds the first list type in the ordered set where type = ?. 142 * 143 * <p> 144 * 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. 145 * </p> 146 * 147 * @param type the type to search with 148 * @param orderByComparator the comparator to order the set by 149 * @return the first matching list type 150 * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found 151 * @throws SystemException if a system exception occurred 152 */ 153 public com.liferay.portal.model.ListType findByType_First( 154 java.lang.String type, 155 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 156 throws com.liferay.portal.NoSuchListTypeException, 157 com.liferay.portal.kernel.exception.SystemException; 158 159 /** 160 * Finds the last list type in the ordered set where type = ?. 161 * 162 * <p> 163 * 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. 164 * </p> 165 * 166 * @param type the type to search with 167 * @param orderByComparator the comparator to order the set by 168 * @return the last matching list type 169 * @throws com.liferay.portal.NoSuchListTypeException if a matching list type could not be found 170 * @throws SystemException if a system exception occurred 171 */ 172 public com.liferay.portal.model.ListType findByType_Last( 173 java.lang.String type, 174 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 175 throws com.liferay.portal.NoSuchListTypeException, 176 com.liferay.portal.kernel.exception.SystemException; 177 178 /** 179 * Finds the list types before and after the current list type in the ordered set where type = ?. 180 * 181 * <p> 182 * 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. 183 * </p> 184 * 185 * @param listTypeId the primary key of the current list type 186 * @param type the type to search with 187 * @param orderByComparator the comparator to order the set by 188 * @return the previous, current, and next list type 189 * @throws com.liferay.portal.NoSuchListTypeException if a list type with the primary key could not be found 190 * @throws SystemException if a system exception occurred 191 */ 192 public com.liferay.portal.model.ListType[] findByType_PrevAndNext( 193 int listTypeId, java.lang.String type, 194 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 195 throws com.liferay.portal.NoSuchListTypeException, 196 com.liferay.portal.kernel.exception.SystemException; 197 198 /** 199 * Finds all the list types. 200 * 201 * @return the list types 202 * @throws SystemException if a system exception occurred 203 */ 204 public java.util.List<com.liferay.portal.model.ListType> findAll() 205 throws com.liferay.portal.kernel.exception.SystemException; 206 207 /** 208 * Finds a range of all the list types. 209 * 210 * <p> 211 * 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. 212 * </p> 213 * 214 * @param start the lower bound of the range of list types to return 215 * @param end the upper bound of the range of list types to return (not inclusive) 216 * @return the range of list types 217 * @throws SystemException if a system exception occurred 218 */ 219 public java.util.List<com.liferay.portal.model.ListType> findAll( 220 int start, int end) 221 throws com.liferay.portal.kernel.exception.SystemException; 222 223 /** 224 * Finds an ordered range of all the list types. 225 * 226 * <p> 227 * 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. 228 * </p> 229 * 230 * @param start the lower bound of the range of list types to return 231 * @param end the upper bound of the range of list types to return (not inclusive) 232 * @param orderByComparator the comparator to order the results by 233 * @return the ordered range of list types 234 * @throws SystemException if a system exception occurred 235 */ 236 public java.util.List<com.liferay.portal.model.ListType> findAll( 237 int start, int end, 238 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 239 throws com.liferay.portal.kernel.exception.SystemException; 240 241 /** 242 * Removes all the list types where type = ? from the database. 243 * 244 * @param type the type to search with 245 * @throws SystemException if a system exception occurred 246 */ 247 public void removeByType(java.lang.String type) 248 throws com.liferay.portal.kernel.exception.SystemException; 249 250 /** 251 * Removes all the list types from the database. 252 * 253 * @throws SystemException if a system exception occurred 254 */ 255 public void removeAll() 256 throws com.liferay.portal.kernel.exception.SystemException; 257 258 /** 259 * Counts all the list types where type = ?. 260 * 261 * @param type the type to search with 262 * @return the number of matching list types 263 * @throws SystemException if a system exception occurred 264 */ 265 public int countByType(java.lang.String type) 266 throws com.liferay.portal.kernel.exception.SystemException; 267 268 /** 269 * Counts all the list types. 270 * 271 * @return the number of list types 272 * @throws SystemException if a system exception occurred 273 */ 274 public int countAll() 275 throws com.liferay.portal.kernel.exception.SystemException; 276 }