Liferay 7.0-ce-b4

com.liferay.portal.service
Class TeamLocalServiceUtil

java.lang.Object
  extended by com.liferay.portal.service.TeamLocalServiceUtil

@ProviderType
public class TeamLocalServiceUtil
extends Object

Provides the local service utility for Team. This utility wraps TeamLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server. 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.

See Also:
TeamLocalService, TeamLocalServiceBaseImpl, TeamLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
TeamLocalServiceUtil()
           
 
Method Summary
static Team addTeam(long userId, long groupId, String name, String description)
          Deprecated. As of 7.0.0, replaced by addTeam(long, long, String, String, ServiceContext)
static Team addTeam(long userId, long groupId, String name, String description, ServiceContext serviceContext)
           
static Team addTeam(Team team)
          Adds the team to the database.
static void addUserGroupTeam(long userGroupId, long teamId)
           
static void addUserGroupTeam(long userGroupId, Team team)
           
static void addUserGroupTeams(long userGroupId, List<Team> Teams)
           
static void addUserGroupTeams(long userGroupId, long[] teamIds)
           
static void addUserTeam(long userId, long teamId)
           
static void addUserTeam(long userId, Team team)
           
static void addUserTeams(long userId, List<Team> Teams)
           
static void addUserTeams(long userId, long[] teamIds)
           
static void clearUserGroupTeams(long userGroupId)
           
static void clearUserTeams(long userId)
           
static Team createTeam(long teamId)
          Creates a new team with the primary key.
static PersistedModel deletePersistedModel(PersistedModel persistedModel)
           
static Team deleteTeam(long teamId)
          Deletes the team with the primary key from the database.
static Team deleteTeam(Team team)
          Deletes the team from the database.
static void deleteTeams(long groupId)
           
static void deleteUserGroupTeam(long userGroupId, long teamId)
           
static void deleteUserGroupTeam(long userGroupId, Team team)
           
static void deleteUserGroupTeams(long userGroupId, List<Team> Teams)
           
static void deleteUserGroupTeams(long userGroupId, long[] teamIds)
           
static void deleteUserTeam(long userId, long teamId)
           
static void deleteUserTeam(long userId, Team team)
           
static void deleteUserTeams(long userId, List<Team> Teams)
           
static void deleteUserTeams(long userId, long[] teamIds)
           
static DynamicQuery dynamicQuery()
           
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static
<T> List<T>
dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Returns the number of rows matching the dynamic query.
static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows matching the dynamic query.
static Team fetchTeam(long teamId)
           
static Team fetchTeam(long groupId, String name)
           
static Team fetchTeamByUuidAndGroupId(String uuid, long groupId)
          Returns the team matching the UUID and group.
static ActionableDynamicQuery getActionableDynamicQuery()
           
static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
           
static List<Team> getGroupTeams(long groupId)
           
static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
           
static String getOSGiServiceIdentifier()
          Returns the OSGi service identifier.
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static TeamLocalService getService()
           
static Team getTeam(long teamId)
          Returns the team with the primary key.
static Team getTeam(long groupId, String name)
           
static Team getTeamByUuidAndGroupId(String uuid, long groupId)
          Returns the team matching the UUID and group.
static List<Team> getTeams(int start, int end)
          Returns a range of all the teams.
static List<Team> getTeamsByUuidAndCompanyId(String uuid, long companyId)
          Returns all the teams matching the UUID and company.
static List<Team> getTeamsByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<Team> orderByComparator)
          Returns a range of teams matching the UUID and company.
static int getTeamsCount()
          Returns the number of teams.
static long[] getUserGroupPrimaryKeys(long teamId)
          Returns the userGroupIds of the user groups associated with the team.
static List<Team> getUserGroupTeams(long userGroupId)
           
static List<Team> getUserGroupTeams(long userGroupId, int start, int end)
           
static List<Team> getUserGroupTeams(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator)
           
static int getUserGroupTeamsCount(long userGroupId)
           
static List<Team> getUserOrUserGroupTeams(long groupId, long userId)
           
static long[] getUserPrimaryKeys(long teamId)
          Returns the userIds of the users associated with the team.
static List<Team> getUserTeams(long userId)
           
static List<Team> getUserTeams(long userId, int start, int end)
           
static List<Team> getUserTeams(long userId, int start, int end, OrderByComparator<Team> orderByComparator)
           
static List<Team> getUserTeams(long userId, long groupId)
           
static int getUserTeamsCount(long userId)
           
static boolean hasUserGroupTeam(long userGroupId, long teamId)
           
static boolean hasUserGroupTeams(long userGroupId)
           
static boolean hasUserTeam(long userId, long teamId)
           
static boolean hasUserTeams(long userId)
           
static List<Team> search(long groupId, String name, String description, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Team> obc)
           
static int searchCount(long groupId, String name, String description, LinkedHashMap<String,Object> params)
           
static void setUserGroupTeams(long userGroupId, long[] teamIds)
           
static void setUserTeams(long userId, long[] teamIds)
           
static Team updateTeam(long teamId, String name, String description)
           
static Team updateTeam(Team team)
          Updates the team in the database or adds it if it does not yet exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeamLocalServiceUtil

public TeamLocalServiceUtil()
Method Detail

addTeam

public static Team addTeam(Team team)
Adds the team to the database. Also notifies the appropriate model listeners.

Parameters:
team - the team
Returns:
the team that was added

addTeam

@Deprecated
public static Team addTeam(long userId,
                                      long groupId,
                                      String name,
                                      String description)
                    throws PortalException
Deprecated. As of 7.0.0, replaced by addTeam(long, long, String, String, ServiceContext)

Throws:
PortalException

addTeam

public static Team addTeam(long userId,
                           long groupId,
                           String name,
                           String description,
                           ServiceContext serviceContext)
                    throws PortalException
Throws:
PortalException

addUserGroupTeam

public static void addUserGroupTeam(long userGroupId,
                                    Team team)

addUserGroupTeam

public static void addUserGroupTeam(long userGroupId,
                                    long teamId)

addUserGroupTeams

public static void addUserGroupTeams(long userGroupId,
                                     List<Team> Teams)

addUserGroupTeams

public static void addUserGroupTeams(long userGroupId,
                                     long[] teamIds)

addUserTeam

public static void addUserTeam(long userId,
                               Team team)

addUserTeam

public static void addUserTeam(long userId,
                               long teamId)

addUserTeams

public static void addUserTeams(long userId,
                                List<Team> Teams)

addUserTeams

public static void addUserTeams(long userId,
                                long[] teamIds)

clearUserGroupTeams

public static void clearUserGroupTeams(long userGroupId)

clearUserTeams

public static void clearUserTeams(long userId)

createTeam

public static Team createTeam(long teamId)
Creates a new team with the primary key. Does not add the team to the database.

Parameters:
teamId - the primary key for the new team
Returns:
the new team

deletePersistedModel

public static PersistedModel deletePersistedModel(PersistedModel persistedModel)
                                           throws PortalException
Throws:
PortalException

deleteTeam

public static Team deleteTeam(Team team)
                       throws PortalException
Deletes the team from the database. Also notifies the appropriate model listeners.

Parameters:
team - the team
Returns:
the team that was removed
Throws:
PortalException

deleteTeam

public static Team deleteTeam(long teamId)
                       throws PortalException
Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
teamId - the primary key of the team
Returns:
the team that was removed
Throws:
PortalException - if a team with the primary key could not be found

deleteTeams

public static void deleteTeams(long groupId)
                        throws PortalException
Throws:
PortalException

deleteUserGroupTeam

public static void deleteUserGroupTeam(long userGroupId,
                                       Team team)

deleteUserGroupTeam

public static void deleteUserGroupTeam(long userGroupId,
                                       long teamId)

deleteUserGroupTeams

public static void deleteUserGroupTeams(long userGroupId,
                                        List<Team> Teams)

deleteUserGroupTeams

public static void deleteUserGroupTeams(long userGroupId,
                                        long[] teamIds)

deleteUserTeam

public static void deleteUserTeam(long userId,
                                  Team team)

deleteUserTeam

public static void deleteUserTeam(long userId,
                                  long teamId)

deleteUserTeams

public static void deleteUserTeams(long userId,
                                   List<Team> Teams)

deleteUserTeams

public static void deleteUserTeams(long userId,
                                   long[] teamIds)

dynamicQuery

public static DynamicQuery dynamicQuery()

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery,
                                       int start,
                                       int end)
Performs a dynamic query on the database and returns a range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from TeamModelImpl. If both orderByComparator 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows

dynamicQuery

public static <T> List<T> dynamicQuery(DynamicQuery dynamicQuery,
                                       int start,
                                       int end,
                                       OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from TeamModelImpl. If both orderByComparator 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.

Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows matching the dynamic query

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
Returns the number of rows matching the dynamic query.

Parameters:
dynamicQuery - the dynamic query
projection - the projection to apply to the query
Returns:
the number of rows matching the dynamic query

fetchTeam

public static Team fetchTeam(long groupId,
                             String name)

fetchTeam

public static Team fetchTeam(long teamId)

fetchTeamByUuidAndGroupId

public static Team fetchTeamByUuidAndGroupId(String uuid,
                                             long groupId)
Returns the team matching the UUID and group.

Parameters:
uuid - the team's UUID
groupId - the primary key of the group
Returns:
the matching team, or null if a matching team could not be found

getActionableDynamicQuery

public static ActionableDynamicQuery getActionableDynamicQuery()

getExportActionableDynamicQuery

public static ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)

getGroupTeams

public static List<Team> getGroupTeams(long groupId)

getIndexableActionableDynamicQuery

public static IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()

getOSGiServiceIdentifier

public static String getOSGiServiceIdentifier()
Returns the OSGi service identifier.

Returns:
the OSGi service identifier

getPersistedModel

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException
Throws:
PortalException

getTeam

public static Team getTeam(long groupId,
                           String name)
                    throws PortalException
Throws:
PortalException

getTeam

public static Team getTeam(long teamId)
                    throws PortalException
Returns the team with the primary key.

Parameters:
teamId - the primary key of the team
Returns:
the team
Throws:
PortalException - if a team with the primary key could not be found

getTeamByUuidAndGroupId

public static Team getTeamByUuidAndGroupId(String uuid,
                                           long groupId)
                                    throws PortalException
Returns the team matching the UUID and group.

Parameters:
uuid - the team's UUID
groupId - the primary key of the group
Returns:
the matching team
Throws:
PortalException - if a matching team could not be found

getTeams

public static List<Team> getTeams(int start,
                                  int end)
Returns a range of all the teams.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil.ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from TeamModelImpl. If both orderByComparator 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.

Parameters:
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
Returns:
the range of teams

getTeamsByUuidAndCompanyId

public static List<Team> getTeamsByUuidAndCompanyId(String uuid,
                                                    long companyId)
Returns all the teams matching the UUID and company.

Parameters:
uuid - the UUID of the teams
companyId - the primary key of the company
Returns:
the matching teams, or an empty list if no matches were found

getTeamsByUuidAndCompanyId

public static List<Team> getTeamsByUuidAndCompanyId(String uuid,
                                                    long companyId,
                                                    int start,
                                                    int end,
                                                    OrderByComparator<Team> orderByComparator)
Returns a range of teams matching the UUID and company.

Parameters:
uuid - the UUID of the teams
companyId - the primary key of the company
start - the lower bound of the range of teams
end - the upper bound of the range of teams (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the range of matching teams, or an empty list if no matches were found

getTeamsCount

public static int getTeamsCount()
Returns the number of teams.

Returns:
the number of teams

getUserGroupPrimaryKeys

public static long[] getUserGroupPrimaryKeys(long teamId)
Returns the userGroupIds of the user groups associated with the team.

Parameters:
teamId - the teamId of the team
Returns:
long[] the userGroupIds of user groups associated with the team

getUserGroupTeams

public static List<Team> getUserGroupTeams(long userGroupId)

getUserGroupTeams

public static List<Team> getUserGroupTeams(long userGroupId,
                                           int start,
                                           int end)

getUserGroupTeams

public static List<Team> getUserGroupTeams(long userGroupId,
                                           int start,
                                           int end,
                                           OrderByComparator<Team> orderByComparator)

getUserGroupTeamsCount

public static int getUserGroupTeamsCount(long userGroupId)

getUserOrUserGroupTeams

public static List<Team> getUserOrUserGroupTeams(long groupId,
                                                 long userId)

getUserPrimaryKeys

public static long[] getUserPrimaryKeys(long teamId)
Returns the userIds of the users associated with the team.

Parameters:
teamId - the teamId of the team
Returns:
long[] the userIds of users associated with the team

getUserTeams

public static List<Team> getUserTeams(long userId)

getUserTeams

public static List<Team> getUserTeams(long userId,
                                      long groupId)

getUserTeams

public static List<Team> getUserTeams(long userId,
                                      int start,
                                      int end)

getUserTeams

public static List<Team> getUserTeams(long userId,
                                      int start,
                                      int end,
                                      OrderByComparator<Team> orderByComparator)

getUserTeamsCount

public static int getUserTeamsCount(long userId)

hasUserGroupTeam

public static boolean hasUserGroupTeam(long userGroupId,
                                       long teamId)

hasUserGroupTeams

public static boolean hasUserGroupTeams(long userGroupId)

hasUserTeam

public static boolean hasUserTeam(long userId,
                                  long teamId)

hasUserTeams

public static boolean hasUserTeams(long userId)

search

public static List<Team> search(long groupId,
                                String name,
                                String description,
                                LinkedHashMap<String,Object> params,
                                int start,
                                int end,
                                OrderByComparator<Team> obc)

searchCount

public static int searchCount(long groupId,
                              String name,
                              String description,
                              LinkedHashMap<String,Object> params)

setUserGroupTeams

public static void setUserGroupTeams(long userGroupId,
                                     long[] teamIds)

setUserTeams

public static void setUserTeams(long userId,
                                long[] teamIds)

updateTeam

public static Team updateTeam(Team team)
Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
team - the team
Returns:
the team that was updated

updateTeam

public static Team updateTeam(long teamId,
                              String name,
                              String description)
                       throws PortalException
Throws:
PortalException

getService

public static TeamLocalService getService()

Liferay 7.0-ce-b4