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 RecentLayoutSetBranch. This utility wraps 024 * {@link com.liferay.portal.service.impl.RecentLayoutSetBranchLocalServiceImpl} 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 RecentLayoutSetBranchLocalService 032 * @see com.liferay.portal.service.base.RecentLayoutSetBranchLocalServiceBaseImpl 033 * @see com.liferay.portal.service.impl.RecentLayoutSetBranchLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class RecentLayoutSetBranchLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.RecentLayoutSetBranchLocalServiceImpl} 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 * @throws PortalException 057 */ 058 public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel( 059 com.liferay.portal.kernel.model.PersistedModel persistedModel) 060 throws com.liferay.portal.kernel.exception.PortalException { 061 return getService().deletePersistedModel(persistedModel); 062 } 063 064 public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel( 065 java.io.Serializable primaryKeyObj) 066 throws com.liferay.portal.kernel.exception.PortalException { 067 return getService().getPersistedModel(primaryKeyObj); 068 } 069 070 /** 071 * Adds the recent layout set branch to the database. Also notifies the appropriate model listeners. 072 * 073 * @param recentLayoutSetBranch the recent layout set branch 074 * @return the recent layout set branch that was added 075 */ 076 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch addRecentLayoutSetBranch( 077 com.liferay.portal.kernel.model.RecentLayoutSetBranch recentLayoutSetBranch) { 078 return getService().addRecentLayoutSetBranch(recentLayoutSetBranch); 079 } 080 081 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch addRecentLayoutSetBranch( 082 long userId, long layoutSetBranchId, long layoutSetId) 083 throws com.liferay.portal.kernel.exception.PortalException { 084 return getService() 085 .addRecentLayoutSetBranch(userId, layoutSetBranchId, 086 layoutSetId); 087 } 088 089 /** 090 * Creates a new recent layout set branch with the primary key. Does not add the recent layout set branch to the database. 091 * 092 * @param recentLayoutSetBranchId the primary key for the new recent layout set branch 093 * @return the new recent layout set branch 094 */ 095 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch createRecentLayoutSetBranch( 096 long recentLayoutSetBranchId) { 097 return getService().createRecentLayoutSetBranch(recentLayoutSetBranchId); 098 } 099 100 /** 101 * Deletes the recent layout set branch from the database. Also notifies the appropriate model listeners. 102 * 103 * @param recentLayoutSetBranch the recent layout set branch 104 * @return the recent layout set branch that was removed 105 */ 106 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch deleteRecentLayoutSetBranch( 107 com.liferay.portal.kernel.model.RecentLayoutSetBranch recentLayoutSetBranch) { 108 return getService().deleteRecentLayoutSetBranch(recentLayoutSetBranch); 109 } 110 111 /** 112 * Deletes the recent layout set branch with the primary key from the database. Also notifies the appropriate model listeners. 113 * 114 * @param recentLayoutSetBranchId the primary key of the recent layout set branch 115 * @return the recent layout set branch that was removed 116 * @throws PortalException if a recent layout set branch with the primary key could not be found 117 */ 118 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch deleteRecentLayoutSetBranch( 119 long recentLayoutSetBranchId) 120 throws com.liferay.portal.kernel.exception.PortalException { 121 return getService().deleteRecentLayoutSetBranch(recentLayoutSetBranchId); 122 } 123 124 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch fetchRecentLayoutSetBranch( 125 long recentLayoutSetBranchId) { 126 return getService().fetchRecentLayoutSetBranch(recentLayoutSetBranchId); 127 } 128 129 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch fetchRecentLayoutSetBranch( 130 long userId, long layoutSetId) { 131 return getService().fetchRecentLayoutSetBranch(userId, layoutSetId); 132 } 133 134 /** 135 * Returns the recent layout set branch with the primary key. 136 * 137 * @param recentLayoutSetBranchId the primary key of the recent layout set branch 138 * @return the recent layout set branch 139 * @throws PortalException if a recent layout set branch with the primary key could not be found 140 */ 141 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch getRecentLayoutSetBranch( 142 long recentLayoutSetBranchId) 143 throws com.liferay.portal.kernel.exception.PortalException { 144 return getService().getRecentLayoutSetBranch(recentLayoutSetBranchId); 145 } 146 147 /** 148 * Updates the recent layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 149 * 150 * @param recentLayoutSetBranch the recent layout set branch 151 * @return the recent layout set branch that was updated 152 */ 153 public static com.liferay.portal.kernel.model.RecentLayoutSetBranch updateRecentLayoutSetBranch( 154 com.liferay.portal.kernel.model.RecentLayoutSetBranch recentLayoutSetBranch) { 155 return getService().updateRecentLayoutSetBranch(recentLayoutSetBranch); 156 } 157 158 /** 159 * Returns the number of recent layout set branchs. 160 * 161 * @return the number of recent layout set branchs 162 */ 163 public static int getRecentLayoutSetBranchsCount() { 164 return getService().getRecentLayoutSetBranchsCount(); 165 } 166 167 /** 168 * Returns the OSGi service identifier. 169 * 170 * @return the OSGi service identifier 171 */ 172 public static java.lang.String getOSGiServiceIdentifier() { 173 return getService().getOSGiServiceIdentifier(); 174 } 175 176 /** 177 * Performs a dynamic query on the database and returns the matching rows. 178 * 179 * @param dynamicQuery the dynamic query 180 * @return the matching rows 181 */ 182 public static <T> java.util.List<T> dynamicQuery( 183 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 184 return getService().dynamicQuery(dynamicQuery); 185 } 186 187 /** 188 * Performs a dynamic query on the database and returns a range of the matching rows. 189 * 190 * <p> 191 * 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.RecentLayoutSetBranchModelImpl}. 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. 192 * </p> 193 * 194 * @param dynamicQuery the dynamic query 195 * @param start the lower bound of the range of model instances 196 * @param end the upper bound of the range of model instances (not inclusive) 197 * @return the range of matching rows 198 */ 199 public static <T> java.util.List<T> dynamicQuery( 200 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 201 int end) { 202 return getService().dynamicQuery(dynamicQuery, start, end); 203 } 204 205 /** 206 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 207 * 208 * <p> 209 * 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.RecentLayoutSetBranchModelImpl}. 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. 210 * </p> 211 * 212 * @param dynamicQuery the dynamic query 213 * @param start the lower bound of the range of model instances 214 * @param end the upper bound of the range of model instances (not inclusive) 215 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 216 * @return the ordered range of matching rows 217 */ 218 public static <T> java.util.List<T> dynamicQuery( 219 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 220 int end, 221 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 222 return getService() 223 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 224 } 225 226 /** 227 * Returns a range of all the recent layout set branchs. 228 * 229 * <p> 230 * 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.RecentLayoutSetBranchModelImpl}. 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. 231 * </p> 232 * 233 * @param start the lower bound of the range of recent layout set branchs 234 * @param end the upper bound of the range of recent layout set branchs (not inclusive) 235 * @return the range of recent layout set branchs 236 */ 237 public static java.util.List<com.liferay.portal.kernel.model.RecentLayoutSetBranch> getRecentLayoutSetBranchs( 238 int start, int end) { 239 return getService().getRecentLayoutSetBranchs(start, end); 240 } 241 242 /** 243 * Returns the number of rows matching the dynamic query. 244 * 245 * @param dynamicQuery the dynamic query 246 * @return the number of rows matching the dynamic query 247 */ 248 public static long dynamicQueryCount( 249 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 250 return getService().dynamicQueryCount(dynamicQuery); 251 } 252 253 /** 254 * Returns the number of rows matching the dynamic query. 255 * 256 * @param dynamicQuery the dynamic query 257 * @param projection the projection to apply to the query 258 * @return the number of rows matching the dynamic query 259 */ 260 public static long dynamicQueryCount( 261 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 262 com.liferay.portal.kernel.dao.orm.Projection projection) { 263 return getService().dynamicQueryCount(dynamicQuery, projection); 264 } 265 266 public static void deleteRecentLayoutSetBranches(long layoutSetBranchId) { 267 getService().deleteRecentLayoutSetBranches(layoutSetBranchId); 268 } 269 270 public static void deleteUserRecentLayoutSetBranches(long userId) { 271 getService().deleteUserRecentLayoutSetBranches(userId); 272 } 273 274 public static RecentLayoutSetBranchLocalService getService() { 275 if (_service == null) { 276 _service = (RecentLayoutSetBranchLocalService)PortalBeanLocatorUtil.locate(RecentLayoutSetBranchLocalService.class.getName()); 277 278 ReferenceRegistry.registerReference(RecentLayoutSetBranchLocalServiceUtil.class, 279 "_service"); 280 } 281 282 return _service; 283 } 284 285 private static RecentLayoutSetBranchLocalService _service; 286 }