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 team 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 TeamLocalServiceUtil
032     * @see com.liferay.portal.service.base.TeamLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.TeamLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface TeamLocalService extends PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link TeamLocalServiceUtil} to access the team local service. Add custom service methods to {@link com.liferay.portal.service.impl.TeamLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Adds the team to the database. Also notifies the appropriate model listeners.
047            *
048            * @param team the team
049            * @return the team that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.Team addTeam(
053                    com.liferay.portal.model.Team team)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new team with the primary key. Does not add the team to the database.
058            *
059            * @param teamId the primary key for the new team
060            * @return the new team
061            */
062            public com.liferay.portal.model.Team createTeam(long teamId);
063    
064            /**
065            * Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.
066            *
067            * @param teamId the primary key of the team
068            * @throws PortalException if a team with the primary key could not be found
069            * @throws SystemException if a system exception occurred
070            */
071            public void deleteTeam(long teamId)
072                    throws com.liferay.portal.kernel.exception.PortalException,
073                            com.liferay.portal.kernel.exception.SystemException;
074    
075            /**
076            * Deletes the team from the database. Also notifies the appropriate model listeners.
077            *
078            * @param team the team
079            * @throws PortalException
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteTeam(com.liferay.portal.model.Team team)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            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.Team fetchTeam(long teamId)
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            /**
153            * Returns the team with the primary key.
154            *
155            * @param teamId the primary key of the team
156            * @return the team
157            * @throws PortalException if a team with the primary key could not be found
158            * @throws SystemException if a system exception occurred
159            */
160            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
161            public com.liferay.portal.model.Team getTeam(long teamId)
162                    throws com.liferay.portal.kernel.exception.PortalException,
163                            com.liferay.portal.kernel.exception.SystemException;
164    
165            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
166            public com.liferay.portal.model.PersistedModel getPersistedModel(
167                    java.io.Serializable primaryKeyObj)
168                    throws com.liferay.portal.kernel.exception.PortalException,
169                            com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns a range of all the teams.
173            *
174            * <p>
175            * 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.
176            * </p>
177            *
178            * @param start the lower bound of the range of teams
179            * @param end the upper bound of the range of teams (not inclusive)
180            * @return the range of teams
181            * @throws SystemException if a system exception occurred
182            */
183            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
184            public java.util.List<com.liferay.portal.model.Team> getTeams(int start,
185                    int end) throws com.liferay.portal.kernel.exception.SystemException;
186    
187            /**
188            * Returns the number of teams.
189            *
190            * @return the number of teams
191            * @throws SystemException if a system exception occurred
192            */
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public int getTeamsCount()
195                    throws com.liferay.portal.kernel.exception.SystemException;
196    
197            /**
198            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
199            *
200            * @param team the team
201            * @return the team that was updated
202            * @throws SystemException if a system exception occurred
203            */
204            public com.liferay.portal.model.Team updateTeam(
205                    com.liferay.portal.model.Team team)
206                    throws com.liferay.portal.kernel.exception.SystemException;
207    
208            /**
209            * Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
210            *
211            * @param team the team
212            * @param merge whether to merge the team 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.
213            * @return the team that was updated
214            * @throws SystemException if a system exception occurred
215            */
216            public com.liferay.portal.model.Team updateTeam(
217                    com.liferay.portal.model.Team team, boolean merge)
218                    throws com.liferay.portal.kernel.exception.SystemException;
219    
220            /**
221            * Returns the Spring bean ID for this bean.
222            *
223            * @return the Spring bean ID for this bean
224            */
225            public java.lang.String getBeanIdentifier();
226    
227            /**
228            * Sets the Spring bean ID for this bean.
229            *
230            * @param beanIdentifier the Spring bean ID for this bean
231            */
232            public void setBeanIdentifier(java.lang.String beanIdentifier);
233    
234            public com.liferay.portal.model.Team addTeam(long userId, long groupId,
235                    java.lang.String name, java.lang.String description)
236                    throws com.liferay.portal.kernel.exception.PortalException,
237                            com.liferay.portal.kernel.exception.SystemException;
238    
239            public void deleteTeams(long groupId)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException;
242    
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public java.util.List<com.liferay.portal.model.Team> getGroupTeams(
245                    long groupId)
246                    throws com.liferay.portal.kernel.exception.SystemException;
247    
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public com.liferay.portal.model.Team getTeam(long groupId,
250                    java.lang.String name)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException;
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
256                    long userId) throws com.liferay.portal.kernel.exception.SystemException;
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portal.model.Team> getUserTeams(
260                    long userId, long groupId)
261                    throws com.liferay.portal.kernel.exception.SystemException;
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public boolean hasUserTeam(long userId, long teamId)
265                    throws com.liferay.portal.kernel.exception.SystemException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portal.model.Team> search(long groupId,
269                    java.lang.String name, java.lang.String description,
270                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
271                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
272                    throws com.liferay.portal.kernel.exception.SystemException;
273    
274            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
275            public int searchCount(long groupId, java.lang.String name,
276                    java.lang.String description,
277                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
278                    throws com.liferay.portal.kernel.exception.SystemException;
279    
280            public com.liferay.portal.model.Team updateTeam(long teamId,
281                    java.lang.String name, java.lang.String description)
282                    throws com.liferay.portal.kernel.exception.PortalException,
283                            com.liferay.portal.kernel.exception.SystemException;
284    }