Interface TeamLocalService
- All Superinterfaces:
BaseLocalService
,CTService<Team>
,PersistedModelLocalService
- All Known Implementing Classes:
TeamLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddTeam
(long userId, long groupId, String name, String description, ServiceContext serviceContext) Adds the team to the database.boolean
addUserGroupTeam
(long userGroupId, long teamId) boolean
addUserGroupTeam
(long userGroupId, Team team) boolean
addUserGroupTeams
(long userGroupId, long[] teamIds) boolean
addUserGroupTeams
(long userGroupId, List<Team> teams) boolean
addUserTeam
(long userId, long teamId) boolean
addUserTeam
(long userId, Team team) boolean
addUserTeams
(long userId, long[] teamIds) boolean
addUserTeams
(long userId, List<Team> teams) void
clearUserGroupTeams
(long userGroupId) void
clearUserTeams
(long userId) createPersistedModel
(Serializable primaryKeyObj) createTeam
(long teamId) Creates a new team with the primary key.deletePersistedModel
(PersistedModel persistedModel) deleteTeam
(long teamId) Deletes the team with the primary key from the database.deleteTeam
(Team team) Deletes the team from the database.void
deleteTeams
(long groupId) void
deleteUserGroupTeam
(long userGroupId, long teamId) void
deleteUserGroupTeam
(long userGroupId, Team team) void
deleteUserGroupTeams
(long userGroupId, long[] teamIds) void
deleteUserGroupTeams
(long userGroupId, List<Team> teams) void
deleteUserTeam
(long userId, long teamId) void
deleteUserTeam
(long userId, Team team) void
deleteUserTeams
(long userId, long[] teamIds) void
deleteUserTeams
(long userId, List<Team> teams) <T> T
dslQuery
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) int
dslQueryCount
(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) <T> List<T>
dynamicQuery
(DynamicQuery dynamicQuery) Performs a dynamic query on the database and returns the matching rows.<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.<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.long
dynamicQueryCount
(DynamicQuery dynamicQuery) Returns the number of rows matching the dynamic query.long
dynamicQueryCount
(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.fetchTeam
(long teamId) fetchTeamByUuidAndGroupId
(String uuid, long groupId) Returns the team matching the UUID and group.getExportActionableDynamicQuery
(PortletDataContext portletDataContext) getGroupTeams
(long groupId) int
getGroupTeamsCount
(long groupId) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) getTeam
(long teamId) Returns the team with the primary key.getTeamByUuidAndGroupId
(String uuid, long groupId) Returns the team matching the UUID and group.getTeams
(int start, int end) Returns a range of all the teams.getTeamsByUuidAndCompanyId
(String uuid, long companyId) Returns all the teams matching the UUID and company.getTeamsByUuidAndCompanyId
(String uuid, long companyId, int start, int end, OrderByComparator<Team> orderByComparator) Returns a range of teams matching the UUID and company.int
Returns the number of teams.long[]
getUserGroupPrimaryKeys
(long teamId) Returns the userGroupIds of the user groups associated with the team.getUserGroupTeams
(long userGroupId) getUserGroupTeams
(long userGroupId, int start, int end) getUserGroupTeams
(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator) int
getUserGroupTeamsCount
(long userGroupId) getUserOrUserGroupTeams
(long groupId, long userId) long[]
getUserPrimaryKeys
(long teamId) Returns the userIds of the users associated with the team.getUserTeams
(long userId) getUserTeams
(long userId, int start, int end) getUserTeams
(long userId, int start, int end, OrderByComparator<Team> orderByComparator) getUserTeams
(long userId, long groupId) int
getUserTeamsCount
(long userId) boolean
hasUserGroupTeam
(long userGroupId, long teamId) boolean
hasUserGroupTeams
(long userGroupId) boolean
hasUserTeam
(long userId, long teamId) boolean
hasUserTeams
(long userId) search
(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) int
searchCount
(long groupId, String name, String description, LinkedHashMap<String, Object> params) void
setUserGroupTeams
(long userGroupId, long[] teamIds) void
setUserTeams
(long userId, long[] teamIds) updateTeam
(long teamId, String name, String description) updateTeam
(Team team) Updates the team in the database or adds it if it does not yet exist.<R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<Team>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addTeam
Team addTeam(long userId, long groupId, String name, String description, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
addTeam
Adds the team to the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
team
- the team- Returns:
- the team that was added
-
addUserGroupTeam
boolean addUserGroupTeam(long userGroupId, long teamId) -
addUserGroupTeam
-
addUserGroupTeams
-
addUserGroupTeams
boolean addUserGroupTeams(long userGroupId, long[] teamIds) -
addUserTeam
boolean addUserTeam(long userId, long teamId) -
addUserTeam
-
addUserTeams
-
addUserTeams
boolean addUserTeams(long userId, long[] teamIds) -
clearUserGroupTeams
void clearUserGroupTeams(long userGroupId) -
clearUserTeams
void clearUserTeams(long userId) -
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
createTeam
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
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deleteTeam
Deletes the team with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- 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
-
deleteTeam
Deletes the team from the database. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
team
- the team- Returns:
- the team that was removed
- Throws:
PortalException
-
deleteTeams
- Throws:
PortalException
-
deleteUserGroupTeam
void deleteUserGroupTeam(long userGroupId, long teamId) -
deleteUserGroupTeam
-
deleteUserGroupTeams
-
deleteUserGroupTeams
void deleteUserGroupTeams(long userGroupId, long[] teamIds) -
deleteUserTeam
void deleteUserTeam(long userId, long teamId) -
deleteUserTeam
-
deleteUserTeams
-
deleteUserTeams
void deleteUserTeams(long userId, long[] teamIds) -
dslQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQuery
in interfacePersistedModelLocalService
-
dslQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery) - Specified by:
dslQueryCount
in interfacePersistedModelLocalService
-
dynamicQuery
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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
@Transactional(propagation=SUPPORTS, readOnly=true) <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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)- Returns:
- the range of matching rows
-
dynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) <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
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl
.- Parameters:
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the ordered range of matching rows
-
dynamicQueryCount
@Transactional(propagation=SUPPORTS, readOnly=true) 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
@Transactional(propagation=SUPPORTS, readOnly=true) long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection) Returns the number of rows matching the dynamic query.- Parameters:
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the query- Returns:
- the number of rows matching the dynamic query
-
fetchTeam
-
fetchTeam
-
fetchTeamByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Team fetchTeamByUuidAndGroupId(String uuid, long groupId) Returns the team matching the UUID and group.- Parameters:
uuid
- the team's UUIDgroupId
- the primary key of the group- Returns:
- the matching team, or
null
if a matching team could not be found
-
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getGroupTeams
-
getGroupTeamsCount
-
getIndexableActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() -
getOSGiServiceIdentifier
String getOSGiServiceIdentifier()Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
getPersistedModel
@Transactional(propagation=SUPPORTS, readOnly=true) PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException - Specified by:
getPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
getTeam
@Transactional(propagation=SUPPORTS, readOnly=true) 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
-
getTeam
@Transactional(propagation=SUPPORTS, readOnly=true) Team getTeam(long groupId, String name) throws PortalException - Throws:
PortalException
-
getTeamByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Team getTeamByUuidAndGroupId(String uuid, long groupId) throws PortalException Returns the team matching the UUID and group.- Parameters:
uuid
- the team's UUIDgroupId
- the primary key of the group- Returns:
- the matching team
- Throws:
PortalException
- if a matching team could not be found
-
getTeams
Returns a range of all the teams.Useful when paginating results. Returns a maximum of
end - start
instances.start
andend
are not primary keys, they are indexes in the result set. Thus,0
refers to the first result in the set. Setting bothstart
andend
tocom.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS
will return the full result set. IforderByComparator
is specified, then the query will include the given ORDER BY logic. IforderByComparator
is absent, then the query will include the default ORDER BY logic fromcom.liferay.portal.model.impl.TeamModelImpl
.- Parameters:
start
- the lower bound of the range of teamsend
- the upper bound of the range of teams (not inclusive)- Returns:
- the range of teams
-
getTeamsByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getTeamsByUuidAndCompanyId(String uuid, long companyId) Returns all the teams matching the UUID and company.- Parameters:
uuid
- the UUID of the teamscompanyId
- the primary key of the company- Returns:
- the matching teams, or an empty list if no matches were found
-
getTeamsByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) 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 teamscompanyId
- the primary key of the companystart
- the lower bound of the range of teamsend
- the upper bound of the range of teams (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching teams, or an empty list if no matches were found
-
getTeamsCount
Returns the number of teams.- Returns:
- the number of teams
-
getUserGroupPrimaryKeys
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
-
getUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserGroupTeams(long userGroupId, int start, int end) -
getUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserGroupTeams(long userGroupId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserGroupTeamsCount
-
getUserOrUserGroupTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserOrUserGroupTeams(long groupId, long userId) -
getUserPrimaryKeys
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
-
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, int start, int end) -
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, int start, int end, OrderByComparator<Team> orderByComparator) -
getUserTeams
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> getUserTeams(long userId, long groupId) -
getUserTeamsCount
-
hasUserGroupTeam
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserGroupTeam(long userGroupId, long teamId) -
hasUserGroupTeams
-
hasUserTeam
-
hasUserTeams
-
search
@Transactional(propagation=SUPPORTS, readOnly=true) List<Team> search(long groupId, String name, String description, LinkedHashMap<String, Object> params, int start, int end, OrderByComparator<Team> orderByComparator) -
searchCount
@Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long groupId, String name, String description, LinkedHashMap<String, Object> params) -
setUserGroupTeams
void setUserGroupTeams(long userGroupId, long[] teamIds) -
setUserTeams
void setUserTeams(long userId, long[] teamIds) -
updateTeam
- Throws:
PortalException
-
updateTeam
Updates the team in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect TeamLocalServiceImpl for overloaded versions of the method. If provided, use these entry points to the API, as the implementation logic may require the additional parameters defined there.
- Parameters:
team
- the team- Returns:
- the team that was updated
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<Team>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<Team>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Team>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<Team>
- Throws:
E extends Throwable
-