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 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 193 public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); 194 195 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 196 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 197 long groupId, boolean privateLayout, java.lang.String name) 198 throws PortalException; 199 200 /** 201 * Returns the layout set branch with the primary key. 202 * 203 * @param layoutSetBranchId the primary key of the layout set branch 204 * @return the layout set branch 205 * @throws PortalException if a layout set branch with the primary key could not be found 206 */ 207 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 208 public com.liferay.portal.model.LayoutSetBranch getLayoutSetBranch( 209 long layoutSetBranchId) throws PortalException; 210 211 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 212 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranches( 213 long groupId, boolean privateLayout); 214 215 /** 216 * Returns a range of all the layout set branchs. 217 * 218 * <p> 219 * 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. 220 * </p> 221 * 222 * @param start the lower bound of the range of layout set branchs 223 * @param end the upper bound of the range of layout set branchs (not inclusive) 224 * @return the range of layout set branchs 225 */ 226 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 227 public java.util.List<com.liferay.portal.model.LayoutSetBranch> getLayoutSetBranchs( 228 int start, int end); 229 230 /** 231 * Returns the number of layout set branchs. 232 * 233 * @return the number of layout set branchs 234 */ 235 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 236 public int getLayoutSetBranchsCount(); 237 238 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 239 public com.liferay.portal.model.LayoutSetBranch getMasterLayoutSetBranch( 240 long groupId, boolean privateLayout) throws PortalException; 241 242 /** 243 * Returns the OSGi service identifier. 244 * 245 * @return the OSGi service identifier 246 */ 247 public java.lang.String getOSGiServiceIdentifier(); 248 249 @Override 250 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 251 public com.liferay.portal.model.PersistedModel getPersistedModel( 252 java.io.Serializable primaryKeyObj) throws PortalException; 253 254 /** 255 * @deprecated As of 6.2.0, replaced by {@link #getUserLayoutSetBranch(long, 256 long, boolean, long, long)} 257 */ 258 @java.lang.Deprecated 259 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 260 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 261 long userId, long groupId, boolean privateLayout, long layoutSetBranchId) 262 throws PortalException; 263 264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 265 public com.liferay.portal.model.LayoutSetBranch getUserLayoutSetBranch( 266 long userId, long groupId, boolean privateLayout, long layoutSetId, 267 long layoutSetBranchId) throws PortalException; 268 269 public com.liferay.portal.model.LayoutSetBranch mergeLayoutSetBranch( 270 long layoutSetBranchId, long mergeLayoutSetBranchId, 271 com.liferay.portal.service.ServiceContext serviceContext) 272 throws PortalException; 273 274 /** 275 * Updates the layout set branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 276 * 277 * @param layoutSetBranch the layout set branch 278 * @return the layout set branch that was updated 279 */ 280 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 281 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 282 com.liferay.portal.model.LayoutSetBranch layoutSetBranch); 283 284 public com.liferay.portal.model.LayoutSetBranch updateLayoutSetBranch( 285 long layoutSetBranchId, java.lang.String name, 286 java.lang.String description, 287 com.liferay.portal.service.ServiceContext serviceContext) 288 throws PortalException; 289 }