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 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 PortalException; 086 087 public com.liferay.portal.model.LayoutSetBranch deleteLayoutSetBranch( 088 com.liferay.portal.model.LayoutSetBranch layoutSetBranch, 089 boolean includeMaster) throws PortalException; 090 091 /** 092 * Deletes the layout set branch with the primary key from the database. Also notifies the appropriate model listeners. 093 * 094 * @param layoutSetBranchId the primary key of the layout set branch 095 * @return the layout set branch that was removed 096 * @throws PortalException if a layout set branch with the primary key could not be found 097 */ 098 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 099 public com.liferay.portal.model.LayoutSetBranch deleteLayoutSetBranch( 100 long layoutSetBranchId) throws PortalException; 101 102 public void deleteLayoutSetBranches(long groupId, boolean privateLayout) 103 throws PortalException; 104 105 public void deleteLayoutSetBranches(long groupId, boolean privateLayout, 106 boolean includeMaster) throws PortalException; 107 108 /** 109 * @throws PortalException 110 */ 111 @Override 112 public com.liferay.portal.model.PersistedModel deletePersistedModel( 113 com.liferay.portal.model.PersistedModel persistedModel) 114 throws PortalException; 115 116 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 117 118 /** 119 * Performs a dynamic query on the database and returns the matching rows. 120 * 121 * @param dynamicQuery the dynamic query 122 * @return the matching rows 123 */ 124 public <T> java.util.List<T> dynamicQuery( 125 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 126 127 /** 128 * Performs a dynamic query on the database and returns a range of the matching rows. 129 * 130 * <p> 131 * 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. 132 * </p> 133 * 134 * @param dynamicQuery the dynamic query 135 * @param start the lower bound of the range of model instances 136 * @param end the upper bound of the range of model instances (not inclusive) 137 * @return the range of matching rows 138 */ 139 public <T> java.util.List<T> dynamicQuery( 140 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 141 int end); 142 143 /** 144 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 145 * 146 * <p> 147 * 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. 148 * </p> 149 * 150 * @param dynamicQuery the dynamic query 151 * @param start the lower bound of the range of model instances 152 * @param end the upper bound of the range of model instances (not inclusive) 153 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 154 * @return the ordered range of matching rows 155 */ 156 public <T> java.util.List<T> dynamicQuery( 157 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 158 int end, 159 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 160 161 /** 162 * Returns the number of rows matching the dynamic query. 163 * 164 * @param dynamicQuery the dynamic query 165 * @return the number of rows matching the dynamic query 166 */ 167 public long dynamicQueryCount( 168 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 169 170 /** 171 * Returns the number of rows matching the dynamic query. 172 * 173 * @param dynamicQuery the dynamic query 174 * @param projection the projection to apply to the query 175 * @return the number of rows matching the dynamic query 176 */ 177 public long dynamicQueryCount( 178 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 179 com.liferay.portal.kernel.dao.orm.Projection projection); 180 181 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 182 public com.liferay.portal.model.LayoutSetBranch fetchLayoutSetBranch( 183 long groupId, boolean privateLayout, java.lang.String name); 184 185 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 186 public com.liferay.portal.model.LayoutSetBranch fetchLayoutSetBranch( 187 long layoutSetBranchId); 188 189 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 190 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 191 192 /** 193 * Returns the Spring bean ID for this bean. 194 * 195 * @return the Spring bean ID for this bean 196 */ 197 public java.lang.String getBeanIdentifier(); 198 199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 200 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 201 long groupId, boolean privateLayout, java.lang.String name) 202 throws PortalException; 203 204 /** 205 * Returns the layout set branch with the primary key. 206 * 207 * @param layoutSetBranchId the primary key of the layout set branch 208 * @return the layout set branch 209 * @throws PortalException if a layout set branch with the primary key could not be found 210 */ 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 213 long layoutSetBranchId) throws PortalException; 214 215 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 216 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches( 217 long groupId, boolean privateLayout); 218 219 /** 220 * Returns a range of all the layout set branchs. 221 * 222 * <p> 223 * 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. 224 * </p> 225 * 226 * @param start the lower bound of the range of layout set branchs 227 * @param end the upper bound of the range of layout set branchs (not inclusive) 228 * @return the range of layout set branchs 229 */ 230 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 231 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranchs( 232 int start, int end); 233 234 /** 235 * Returns the number of layout set branchs. 236 * 237 * @return the number of layout set branchs 238 */ 239 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 240 public int getLayoutSetBranchsCount(); 241 242 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 243 public com.liferay.portal.model.LayoutSetBranch getMasterLayoutSetBranch( 244 long groupId, boolean privateLayout) throws PortalException; 245 246 @Override 247 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 248 public com.liferay.portal.model.PersistedModel getPersistedModel( 249 java.io.Serializable primaryKeyObj) throws PortalException; 250 251 /** 252 * @deprecated As of 6.2.0, replaced by {@link #getUserLayoutSetBranch(long, 253 long, boolean, long, long)} 254 */ 255 @java.lang.Deprecated 256 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 257 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 258 long userId, long groupId, boolean privateLayout, long layoutSetBranchId) 259 throws PortalException; 260 261 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 262 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 263 long userId, long groupId, boolean privateLayout, long layoutSetId, 264 long layoutSetBranchId) throws PortalException; 265 266 public com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch( 267 long layoutSetBranchId, long mergeLayoutSetBranchId, 268 com.liferay.portal.service.ServiceContext serviceContext) 269 throws PortalException; 270 271 /** 272 * Sets the Spring bean ID for this bean. 273 * 274 * @param beanIdentifier the Spring bean ID for this bean 275 */ 276 public void setBeanIdentifier(java.lang.String beanIdentifier); 277 278 /** 279 * Updates the layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 280 * 281 * @param layoutSetBranch the layout set branch 282 * @return the layout set branch that was updated 283 */ 284 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 285 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 286 com.liferay.portal.model.LayoutSetBranch layoutSetBranch); 287 288 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 289 long layoutSetBranchId, java.lang.String name, 290 java.lang.String description, 291 com.liferay.portal.service.ServiceContext serviceContext) 292 throws PortalException; 293 }