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.kernel.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for ListType. This utility wraps 024 * {@link com.liferay.portal.service.impl.ListTypeLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see ListTypeLocalService 032 * @see com.liferay.portal.service.base.ListTypeLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.ListTypeLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class ListTypeLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ListTypeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 044 return getService().getActionableDynamicQuery(); 045 } 046 047 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 048 return getService().dynamicQuery(); 049 } 050 051 public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() { 052 return getService().getIndexableActionableDynamicQuery(); 053 } 054 055 /** 056 * Adds the list type to the database. Also notifies the appropriate model listeners. 057 * 058 * @param listType the list type 059 * @return the list type that was added 060 */ 061 public static com.liferay.portal.kernel.model.ListType addListType( 062 com.liferay.portal.kernel.model.ListType listType) { 063 return getService().addListType(listType); 064 } 065 066 public static com.liferay.portal.kernel.model.ListType addListType( 067 java.lang.String name, java.lang.String type) { 068 return getService().addListType(name, type); 069 } 070 071 /** 072 * Creates a new list type with the primary key. Does not add the list type to the database. 073 * 074 * @param listTypeId the primary key for the new list type 075 * @return the new list type 076 */ 077 public static com.liferay.portal.kernel.model.ListType createListType( 078 long listTypeId) { 079 return getService().createListType(listTypeId); 080 } 081 082 /** 083 * Deletes the list type from the database. Also notifies the appropriate model listeners. 084 * 085 * @param listType the list type 086 * @return the list type that was removed 087 */ 088 public static com.liferay.portal.kernel.model.ListType deleteListType( 089 com.liferay.portal.kernel.model.ListType listType) { 090 return getService().deleteListType(listType); 091 } 092 093 /** 094 * Deletes the list type with the primary key from the database. Also notifies the appropriate model listeners. 095 * 096 * @param listTypeId the primary key of the list type 097 * @return the list type that was removed 098 * @throws PortalException if a list type with the primary key could not be found 099 */ 100 public static com.liferay.portal.kernel.model.ListType deleteListType( 101 long listTypeId) 102 throws com.liferay.portal.kernel.exception.PortalException { 103 return getService().deleteListType(listTypeId); 104 } 105 106 public static com.liferay.portal.kernel.model.ListType fetchListType( 107 long listTypeId) { 108 return getService().fetchListType(listTypeId); 109 } 110 111 /** 112 * Returns the list type with the primary key. 113 * 114 * @param listTypeId the primary key of the list type 115 * @return the list type 116 * @throws PortalException if a list type with the primary key could not be found 117 */ 118 public static com.liferay.portal.kernel.model.ListType getListType( 119 long listTypeId) 120 throws com.liferay.portal.kernel.exception.PortalException { 121 return getService().getListType(listTypeId); 122 } 123 124 /** 125 * Updates the list type in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 126 * 127 * @param listType the list type 128 * @return the list type that was updated 129 */ 130 public static com.liferay.portal.kernel.model.ListType updateListType( 131 com.liferay.portal.kernel.model.ListType listType) { 132 return getService().updateListType(listType); 133 } 134 135 /** 136 * @throws PortalException 137 */ 138 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 139 com.liferay.portal.kernel.model.PersistedModel persistedModel) 140 throws com.liferay.portal.kernel.exception.PortalException { 141 return getService().deletePersistedModel(persistedModel); 142 } 143 144 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 145 java.io.Serializable primaryKeyObj) 146 throws com.liferay.portal.kernel.exception.PortalException { 147 return getService().getPersistedModel(primaryKeyObj); 148 } 149 150 /** 151 * Returns the number of list types. 152 * 153 * @return the number of list types 154 */ 155 public static int getListTypesCount() { 156 return getService().getListTypesCount(); 157 } 158 159 /** 160 * Returns the OSGi service identifier. 161 * 162 * @return the OSGi service identifier 163 */ 164 public static java.lang.String getOSGiServiceIdentifier() { 165 return getService().getOSGiServiceIdentifier(); 166 } 167 168 /** 169 * Performs a dynamic query on the database and returns the matching rows. 170 * 171 * @param dynamicQuery the dynamic query 172 * @return the matching rows 173 */ 174 public static <T> java.util.List<T> dynamicQuery( 175 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 176 return getService().dynamicQuery(dynamicQuery); 177 } 178 179 /** 180 * Performs a dynamic query on the database and returns a range of the matching rows. 181 * 182 * <p> 183 * 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. 184 * </p> 185 * 186 * @param dynamicQuery the dynamic query 187 * @param start the lower bound of the range of model instances 188 * @param end the upper bound of the range of model instances (not inclusive) 189 * @return the range of matching rows 190 */ 191 public static <T> java.util.List<T> dynamicQuery( 192 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 193 int end) { 194 return getService().dynamicQuery(dynamicQuery, start, end); 195 } 196 197 /** 198 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 199 * 200 * <p> 201 * 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. 202 * </p> 203 * 204 * @param dynamicQuery the dynamic query 205 * @param start the lower bound of the range of model instances 206 * @param end the upper bound of the range of model instances (not inclusive) 207 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 208 * @return the ordered range of matching rows 209 */ 210 public static <T> java.util.List<T> dynamicQuery( 211 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 212 int end, 213 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 214 return getService() 215 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 216 } 217 218 /** 219 * Returns a range of all the list types. 220 * 221 * <p> 222 * 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. 223 * </p> 224 * 225 * @param start the lower bound of the range of list types 226 * @param end the upper bound of the range of list types (not inclusive) 227 * @return the range of list types 228 */ 229 public static java.util.List<com.liferay.portal.kernel.model.ListType> getListTypes( 230 int start, int end) { 231 return getService().getListTypes(start, end); 232 } 233 234 public static java.util.List<com.liferay.portal.kernel.model.ListType> getListTypes( 235 java.lang.String type) { 236 return getService().getListTypes(type); 237 } 238 239 /** 240 * Returns the number of rows matching the dynamic query. 241 * 242 * @param dynamicQuery the dynamic query 243 * @return the number of rows matching the dynamic query 244 */ 245 public static long dynamicQueryCount( 246 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 247 return getService().dynamicQueryCount(dynamicQuery); 248 } 249 250 /** 251 * Returns the number of rows matching the dynamic query. 252 * 253 * @param dynamicQuery the dynamic query 254 * @param projection the projection to apply to the query 255 * @return the number of rows matching the dynamic query 256 */ 257 public static long dynamicQueryCount( 258 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 259 com.liferay.portal.kernel.dao.orm.Projection projection) { 260 return getService().dynamicQueryCount(dynamicQuery, projection); 261 } 262 263 public static void validate(long listTypeId, java.lang.String type) 264 throws com.liferay.portal.kernel.exception.PortalException { 265 getService().validate(listTypeId, type); 266 } 267 268 public static void validate(long listTypeId, long classNameId, 269 java.lang.String type) 270 throws com.liferay.portal.kernel.exception.PortalException { 271 getService().validate(listTypeId, classNameId, type); 272 } 273 274 public static ListTypeLocalService getService() { 275 if (_service == null) { 276 _service = (ListTypeLocalService)PortalBeanLocatorUtil.locate(ListTypeLocalService.class.getName()); 277 278 ReferenceRegistry.registerReference(ListTypeLocalServiceUtil.class, 279 "_service"); 280 } 281 282 return _service; 283 } 284 285 private static ListTypeLocalService _service; 286 }