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