001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the layout branch local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see LayoutBranchLocalServiceUtil
032     * @see com.liferay.portal.service.base.LayoutBranchLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutBranchLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface LayoutBranchLocalService extends PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link LayoutBranchLocalServiceUtil} to access the layout branch local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutBranchLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Adds the layout branch to the database. Also notifies the appropriate model listeners.
047            *
048            * @param layoutBranch the layout branch
049            * @return the layout branch that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.LayoutBranch addLayoutBranch(
053                    com.liferay.portal.model.LayoutBranch layoutBranch)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new layout branch with the primary key. Does not add the layout branch to the database.
058            *
059            * @param LayoutBranchId the primary key for the new layout branch
060            * @return the new layout branch
061            */
062            public com.liferay.portal.model.LayoutBranch createLayoutBranch(
063                    long LayoutBranchId);
064    
065            /**
066            * Deletes the layout branch with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param LayoutBranchId the primary key of the layout branch
069            * @throws PortalException if a layout branch with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public void deleteLayoutBranch(long LayoutBranchId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the layout branch from the database. Also notifies the appropriate model listeners.
078            *
079            * @param layoutBranch the layout branch
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteLayoutBranch(
083                    com.liferay.portal.model.LayoutBranch layoutBranch)
084                    throws com.liferay.portal.kernel.exception.SystemException;
085    
086            /**
087            * Performs a dynamic query on the database and returns the matching rows.
088            *
089            * @param dynamicQuery the dynamic query
090            * @return the matching rows
091            * @throws SystemException if a system exception occurred
092            */
093            @SuppressWarnings("rawtypes")
094            public java.util.List dynamicQuery(
095                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * Performs a dynamic query on the database and returns a range of the matching rows.
100            *
101            * <p>
102            * 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.
103            * </p>
104            *
105            * @param dynamicQuery the dynamic query
106            * @param start the lower bound of the range of model instances
107            * @param end the upper bound of the range of model instances (not inclusive)
108            * @return the range of matching rows
109            * @throws SystemException if a system exception occurred
110            */
111            @SuppressWarnings("rawtypes")
112            public java.util.List dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114                    int end) throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException;
136    
137            /**
138            * Returns the number of rows that match the dynamic query.
139            *
140            * @param dynamicQuery the dynamic query
141            * @return the number of rows that match the dynamic query
142            * @throws SystemException if a system exception occurred
143            */
144            public long dynamicQueryCount(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public com.liferay.portal.model.LayoutBranch fetchLayoutBranch(
150                    long LayoutBranchId)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the layout branch with the primary key.
155            *
156            * @param LayoutBranchId the primary key of the layout branch
157            * @return the layout branch
158            * @throws PortalException if a layout branch with the primary key could not be found
159            * @throws SystemException if a system exception occurred
160            */
161            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
162            public com.liferay.portal.model.LayoutBranch getLayoutBranch(
163                    long LayoutBranchId)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168            public com.liferay.portal.model.PersistedModel getPersistedModel(
169                    java.io.Serializable primaryKeyObj)
170                    throws com.liferay.portal.kernel.exception.PortalException,
171                            com.liferay.portal.kernel.exception.SystemException;
172    
173            /**
174            * Returns a range of all the layout branchs.
175            *
176            * <p>
177            * 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.
178            * </p>
179            *
180            * @param start the lower bound of the range of layout branchs
181            * @param end the upper bound of the range of layout branchs (not inclusive)
182            * @return the range of layout branchs
183            * @throws SystemException if a system exception occurred
184            */
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutBranchs(
187                    int start, int end)
188                    throws com.liferay.portal.kernel.exception.SystemException;
189    
190            /**
191            * Returns the number of layout branchs.
192            *
193            * @return the number of layout branchs
194            * @throws SystemException if a system exception occurred
195            */
196            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
197            public int getLayoutBranchsCount()
198                    throws com.liferay.portal.kernel.exception.SystemException;
199    
200            /**
201            * Updates the layout branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
202            *
203            * @param layoutBranch the layout branch
204            * @return the layout branch that was updated
205            * @throws SystemException if a system exception occurred
206            */
207            public com.liferay.portal.model.LayoutBranch updateLayoutBranch(
208                    com.liferay.portal.model.LayoutBranch layoutBranch)
209                    throws com.liferay.portal.kernel.exception.SystemException;
210    
211            /**
212            * Updates the layout branch in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
213            *
214            * @param layoutBranch the layout branch
215            * @param merge whether to merge the layout branch with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
216            * @return the layout branch that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portal.model.LayoutBranch updateLayoutBranch(
220                    com.liferay.portal.model.LayoutBranch layoutBranch, boolean merge)
221                    throws com.liferay.portal.kernel.exception.SystemException;
222    
223            /**
224            * Returns the Spring bean ID for this bean.
225            *
226            * @return the Spring bean ID for this bean
227            */
228            public java.lang.String getBeanIdentifier();
229    
230            /**
231            * Sets the Spring bean ID for this bean.
232            *
233            * @param beanIdentifier the Spring bean ID for this bean
234            */
235            public void setBeanIdentifier(java.lang.String beanIdentifier);
236    
237            public com.liferay.portal.model.LayoutBranch addLayoutBranch(
238                    long layoutSetBranchId, long plid, java.lang.String name,
239                    java.lang.String description, boolean master,
240                    com.liferay.portal.service.ServiceContext serviceContext)
241                    throws com.liferay.portal.kernel.exception.PortalException,
242                            com.liferay.portal.kernel.exception.SystemException;
243    
244            public com.liferay.portal.model.LayoutBranch addLayoutBranch(
245                    long layoutRevisionId, java.lang.String name,
246                    java.lang.String description, boolean master,
247                    com.liferay.portal.service.ServiceContext serviceContext)
248                    throws com.liferay.portal.kernel.exception.PortalException,
249                            com.liferay.portal.kernel.exception.SystemException;
250    
251            public void deleteLayoutSetBranchLayoutBranches(long layoutSetBranchId)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException;
254    
255            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
256            public java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutBranches(
257                    long layoutSetBranchId, long plid, int start, int end,
258                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portal.model.LayoutBranch> getLayoutSetBranchLayoutBranches(
263                    long layoutSetBranchId)
264                    throws com.liferay.portal.kernel.exception.SystemException;
265    
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public com.liferay.portal.model.LayoutBranch getMasterLayoutBranch(
268                    long layoutSetBranchId, long plid)
269                    throws com.liferay.portal.kernel.exception.PortalException,
270                            com.liferay.portal.kernel.exception.SystemException;
271    
272            public com.liferay.portal.model.LayoutBranch updateLayoutBranch(
273                    long layoutBranchId, java.lang.String name,
274                    java.lang.String description,
275                    com.liferay.portal.service.ServiceContext serviceContext)
276                    throws com.liferay.portal.kernel.exception.PortalException,
277                            com.liferay.portal.kernel.exception.SystemException;
278    }