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.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 026 /** 027 * Provides the local service interface for LayoutSetBranch. Methods of this 028 * service will not have security checks based on the propagated JAAS 029 * credentials because this service can only be accessed from within the same 030 * VM. 031 * 032 * @author Brian Wing Shun Chan 033 * @see LayoutSetBranchLocalServiceUtil 034 * @see com.liferay.portal.service.base.LayoutSetBranchLocalServiceBaseImpl 035 * @see com.liferay.portal.service.impl.LayoutSetBranchLocalServiceImpl 036 * @generated 037 */ 038 @ProviderType 039 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 040 PortalException.class, SystemException.class}) 041 public interface LayoutSetBranchLocalService extends BaseLocalService, 042 PersistedModelLocalService { 043 /* 044 * NOTE FOR DEVELOPERS: 045 * 046 * Never modify or reference this interface directly. Always use {@link LayoutSetBranchLocalServiceUtil} to access the layout set branch local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetBranchLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 047 */ 048 049 /** 050 * Adds the layout set branch to the database. Also notifies the appropriate model listeners. 051 * 052 * @param layoutSetBranch the layout set branch 053 * @return the layout set branch that was added 054 */ 055 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 056 public com.liferay.portal.model.LayoutSetBranch addLayoutSetBranch( 057 com.liferay.portal.model.LayoutSetBranch layoutSetBranch); 058 059 public com.liferay.portal.model.LayoutSetBranch addLayoutSetBranch( 060 long userId, long groupId, boolean privateLayout, 061 java.lang.String name, java.lang.String description, boolean master, 062 long copyLayoutSetBranchId, 063 com.liferay.portal.service.ServiceContext serviceContext) 064 throws com.liferay.portal.kernel.exception.PortalException; 065 066 /** 067 * Creates a new layout set branch with the primary key. Does not add the layout set branch to the database. 068 * 069 * @param layoutSetBranchId the primary key for the new layout set branch 070 * @return the new layout set branch 071 */ 072 public com.liferay.portal.model.LayoutSetBranch createLayoutSetBranch( 073 long layoutSetBranchId); 074 075 /** 076 * Deletes the layout set branch from the database. Also notifies the appropriate model listeners. 077 * 078 * @param layoutSetBranch the layout set branch 079 * @return the layout set branch that was removed 080 * @throws PortalException 081 */ 082 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 083 public com.liferay.portal.model.LayoutSetBranch deleteLayoutSetBranch( 084 com.liferay.portal.model.LayoutSetBranch layoutSetBranch) 085 throws com.liferay.portal.kernel.exception.PortalException; 086 087 public com.liferay.portal.model.LayoutSetBranch deleteLayoutSetBranch( 088 com.liferay.portal.model.LayoutSetBranch layoutSetBranch, 089 boolean includeMaster) 090 throws com.liferay.portal.kernel.exception.PortalException; 091 092 /** 093 * Deletes the layout set branch with the primary key from the database. Also notifies the appropriate model listeners. 094 * 095 * @param layoutSetBranchId the primary key of the layout set branch 096 * @return the layout set branch that was removed 097 * @throws PortalException if a layout set branch with the primary key could not be found 098 */ 099 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 100 public com.liferay.portal.model.LayoutSetBranch deleteLayoutSetBranch( 101 long layoutSetBranchId) 102 throws com.liferay.portal.kernel.exception.PortalException; 103 104 public void deleteLayoutSetBranches(long groupId, boolean privateLayout) 105 throws com.liferay.portal.kernel.exception.PortalException; 106 107 public void deleteLayoutSetBranches(long groupId, boolean privateLayout, 108 boolean includeMaster) 109 throws com.liferay.portal.kernel.exception.PortalException; 110 111 /** 112 * @throws PortalException 113 */ 114 @Override 115 public com.liferay.portal.model.PersistedModel deletePersistedModel( 116 com.liferay.portal.model.PersistedModel persistedModel) 117 throws com.liferay.portal.kernel.exception.PortalException; 118 119 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 120 121 /** 122 * Performs a dynamic query on the database and returns the matching rows. 123 * 124 * @param dynamicQuery the dynamic query 125 * @return the matching rows 126 */ 127 public <T> java.util.List<T> dynamicQuery( 128 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 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.LayoutSetBranchModelImpl}. 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 <T> java.util.List<T> dynamicQuery( 143 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 144 int end); 145 146 /** 147 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 148 * 149 * <p> 150 * 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.LayoutSetBranchModelImpl}. 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. 151 * </p> 152 * 153 * @param dynamicQuery the dynamic query 154 * @param start the lower bound of the range of model instances 155 * @param end the upper bound of the range of model instances (not inclusive) 156 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 157 * @return the ordered range of matching rows 158 */ 159 public <T> java.util.List<T> dynamicQuery( 160 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 161 int end, 162 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 163 164 /** 165 * Returns the number of rows matching the dynamic query. 166 * 167 * @param dynamicQuery the dynamic query 168 * @return the number of rows matching the dynamic query 169 */ 170 public long dynamicQueryCount( 171 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 172 173 /** 174 * Returns the number of rows matching the dynamic query. 175 * 176 * @param dynamicQuery the dynamic query 177 * @param projection the projection to apply to the query 178 * @return the number of rows matching the dynamic query 179 */ 180 public long dynamicQueryCount( 181 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 182 com.liferay.portal.kernel.dao.orm.Projection projection); 183 184 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 185 public com.liferay.portal.model.LayoutSetBranch fetchLayoutSetBranch( 186 long groupId, boolean privateLayout, java.lang.String name); 187 188 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 189 public com.liferay.portal.model.LayoutSetBranch fetchLayoutSetBranch( 190 long layoutSetBranchId); 191 192 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 193 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 194 195 /** 196 * Returns the Spring bean ID for this bean. 197 * 198 * @return the Spring bean ID for this bean 199 */ 200 public java.lang.String getBeanIdentifier(); 201 202 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 203 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 204 long groupId, boolean privateLayout, java.lang.String name) 205 throws com.liferay.portal.kernel.exception.PortalException; 206 207 /** 208 * Returns the layout set branch with the primary key. 209 * 210 * @param layoutSetBranchId the primary key of the layout set branch 211 * @return the layout set branch 212 * @throws PortalException if a layout set branch with the primary key could not be found 213 */ 214 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 215 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 216 long layoutSetBranchId) 217 throws com.liferay.portal.kernel.exception.PortalException; 218 219 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 220 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches( 221 long groupId, boolean privateLayout); 222 223 /** 224 * Returns a range of all the layout set branchs. 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. 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.LayoutSetBranchModelImpl}. 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. 228 * </p> 229 * 230 * @param start the lower bound of the range of layout set branchs 231 * @param end the upper bound of the range of layout set branchs (not inclusive) 232 * @return the range of layout set branchs 233 */ 234 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 235 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranchs( 236 int start, int end); 237 238 /** 239 * Returns the number of layout set branchs. 240 * 241 * @return the number of layout set branchs 242 */ 243 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 244 public int getLayoutSetBranchsCount(); 245 246 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 247 public com.liferay.portal.model.LayoutSetBranch getMasterLayoutSetBranch( 248 long groupId, boolean privateLayout) 249 throws com.liferay.portal.kernel.exception.PortalException; 250 251 @Override 252 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 253 public com.liferay.portal.model.PersistedModel getPersistedModel( 254 java.io.Serializable primaryKeyObj) 255 throws com.liferay.portal.kernel.exception.PortalException; 256 257 /** 258 * @deprecated As of 6.2.0, replaced by {@link #getUserLayoutSetBranch(long, 259 long, boolean, long, long)} 260 */ 261 @java.lang.Deprecated 262 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 263 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 264 long userId, long groupId, boolean privateLayout, long layoutSetBranchId) 265 throws com.liferay.portal.kernel.exception.PortalException; 266 267 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 268 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 269 long userId, long groupId, boolean privateLayout, long layoutSetId, 270 long layoutSetBranchId) 271 throws com.liferay.portal.kernel.exception.PortalException; 272 273 public com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch( 274 long layoutSetBranchId, long mergeLayoutSetBranchId, 275 com.liferay.portal.service.ServiceContext serviceContext) 276 throws com.liferay.portal.kernel.exception.PortalException; 277 278 /** 279 * Sets the Spring bean ID for this bean. 280 * 281 * @param beanIdentifier the Spring bean ID for this bean 282 */ 283 public void setBeanIdentifier(java.lang.String beanIdentifier); 284 285 /** 286 * Updates the layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 287 * 288 * @param layoutSetBranch the layout set branch 289 * @return the layout set branch that was updated 290 */ 291 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 292 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 293 com.liferay.portal.model.LayoutSetBranch layoutSetBranch); 294 295 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 296 long layoutSetBranchId, java.lang.String name, 297 java.lang.String description, 298 com.liferay.portal.service.ServiceContext serviceContext) 299 throws com.liferay.portal.kernel.exception.PortalException; 300 }