Interface RepositoryLocalService
- All Superinterfaces:
BaseLocalService
,CTService<Repository>
,PersistedModelLocalService
- All Known Implementing Classes:
RepositoryLocalServiceWrapper
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionaddRepository
(Repository repository) Adds the repository to the database.addRepository
(String externalReferenceCode, long userId, long groupId, long classNameId, long parentFolderId, String name, String description, String portletId, UnicodeProperties typeSettingsUnicodeProperties, boolean hidden, ServiceContext serviceContext) void
checkRepository
(long repositoryId) createPersistedModel
(Serializable primaryKeyObj) createRepository
(long repositoryId) Creates a new repository with the primary key.deletePersistedModel
(PersistedModel persistedModel) void
deleteRepositories
(long groupId) deleteRepository
(long repositoryId) Deletes the repository with the primary key from the database.deleteRepository
(Repository repository) Deletes the repository from the database.<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.fetchRepository
(long repositoryId) fetchRepository
(long groupId, String portletId) fetchRepository
(long groupId, String name, String portletId) fetchRepositoryByExternalReferenceCode
(String externalReferenceCode, long groupId) fetchRepositoryByUuidAndGroupId
(String uuid, long groupId) Returns the repository matching the UUID and group.getExportActionableDynamicQuery
(PortletDataContext portletDataContext) getGroupRepositories
(long groupId) Returns the OSGi service identifier.getPersistedModel
(Serializable primaryKeyObj) getRepositories
(int start, int end) Returns a range of all the repositories.getRepositoriesByUuidAndCompanyId
(String uuid, long companyId) Returns all the repositories matching the UUID and company.getRepositoriesByUuidAndCompanyId
(String uuid, long companyId, int start, int end, OrderByComparator<Repository> orderByComparator) Returns a range of repositories matching the UUID and company.int
Returns the number of repositories.getRepository
(long repositoryId) Returns the repository with the primary key.getRepository
(long groupId, String portletId) getRepository
(long groupId, String name, String portletId) getRepositoryByExternalReferenceCode
(String externalReferenceCode, long groupId) getRepositoryByUuidAndGroupId
(String uuid, long groupId) Returns the repository matching the UUID and group.getTypeSettingsProperties
(long repositoryId) void
updateRepository
(long repositoryId, UnicodeProperties typeSettingsUnicodeProperties) void
updateRepository
(long repositoryId, String name, String description) updateRepository
(Repository repository) Updates the repository in the database or adds it if it does not yet exist.<R,
E extends Throwable>
RupdateWithUnsafeFunction
(com.liferay.petra.function.UnsafeFunction<CTPersistence<Repository>, R, E> updateUnsafeFunction) Methods inherited from interface com.liferay.portal.kernel.service.PersistedModelLocalService
fetchPersistedModel, getBasePersistence
-
Method Details
-
addRepository
Adds the repository to the database. Also notifies the appropriate model listeners.Important: Inspect RepositoryLocalServiceImpl 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:
repository
- the repository- Returns:
- the repository that was added
-
addRepository
Repository addRepository(String externalReferenceCode, long userId, long groupId, long classNameId, long parentFolderId, String name, String description, String portletId, UnicodeProperties typeSettingsUnicodeProperties, boolean hidden, ServiceContext serviceContext) throws PortalException - Throws:
PortalException
-
checkRepository
void checkRepository(long repositoryId) -
createPersistedModel
- Specified by:
createPersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
createRepository
Creates a new repository with the primary key. Does not add the repository to the database.- Parameters:
repositoryId
- the primary key for the new repository- Returns:
- the new repository
-
deletePersistedModel
- Specified by:
deletePersistedModel
in interfacePersistedModelLocalService
- Throws:
PortalException
-
deleteRepositories
- Throws:
PortalException
-
deleteRepository
Deletes the repository with the primary key from the database. Also notifies the appropriate model listeners.Important: Inspect RepositoryLocalServiceImpl 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:
repositoryId
- the primary key of the repository- Returns:
- the repository that was removed
- Throws:
PortalException
- if a repository with the primary key could not be found
-
deleteRepository
@Indexable(type=DELETE) @SystemEvent(action=1, type=1) Repository deleteRepository(Repository repository) throws PortalException Deletes the repository from the database. Also notifies the appropriate model listeners.Important: Inspect RepositoryLocalServiceImpl 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:
repository
- the repository- Returns:
- the repository that was removed
- Throws:
PortalException
-
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.RepositoryModelImpl
.- 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.RepositoryModelImpl
.- 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
-
fetchRepository
-
fetchRepository
@Transactional(propagation=SUPPORTS, readOnly=true) Repository fetchRepository(long groupId, String portletId) -
fetchRepository
@Transactional(propagation=SUPPORTS, readOnly=true) Repository fetchRepository(long groupId, String name, String portletId) -
fetchRepositoryByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) Repository fetchRepositoryByExternalReferenceCode(String externalReferenceCode, long groupId) -
fetchRepositoryByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Repository fetchRepositoryByUuidAndGroupId(String uuid, long groupId) Returns the repository matching the UUID and group.- Parameters:
uuid
- the repository's UUIDgroupId
- the primary key of the group- Returns:
- the matching repository, or
null
if a matching repository could not be found
-
getActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ActionableDynamicQuery getActionableDynamicQuery() -
getExportActionableDynamicQuery
@Transactional(propagation=SUPPORTS, readOnly=true) ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext) -
getGroupRepositories
@Transactional(propagation=SUPPORTS, readOnly=true) List<Repository> getGroupRepositories(long groupId) -
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
-
getRepositories
@Transactional(propagation=SUPPORTS, readOnly=true) List<Repository> getRepositories(int start, int end) Returns a range of all the repositories.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.RepositoryModelImpl
.- Parameters:
start
- the lower bound of the range of repositoriesend
- the upper bound of the range of repositories (not inclusive)- Returns:
- the range of repositories
-
getRepositoriesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<Repository> getRepositoriesByUuidAndCompanyId(String uuid, long companyId) Returns all the repositories matching the UUID and company.- Parameters:
uuid
- the UUID of the repositoriescompanyId
- the primary key of the company- Returns:
- the matching repositories, or an empty list if no matches were found
-
getRepositoriesByUuidAndCompanyId
@Transactional(propagation=SUPPORTS, readOnly=true) List<Repository> getRepositoriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator<Repository> orderByComparator) Returns a range of repositories matching the UUID and company.- Parameters:
uuid
- the UUID of the repositoriescompanyId
- the primary key of the companystart
- the lower bound of the range of repositoriesend
- the upper bound of the range of repositories (not inclusive)orderByComparator
- the comparator to order the results by (optionallynull
)- Returns:
- the range of matching repositories, or an empty list if no matches were found
-
getRepositoriesCount
Returns the number of repositories.- Returns:
- the number of repositories
-
getRepository
@Transactional(propagation=SUPPORTS, readOnly=true) Repository getRepository(long repositoryId) throws PortalException Returns the repository with the primary key.- Parameters:
repositoryId
- the primary key of the repository- Returns:
- the repository
- Throws:
PortalException
- if a repository with the primary key could not be found
-
getRepository
@Transactional(propagation=SUPPORTS, readOnly=true) Repository getRepository(long groupId, String portletId) throws PortalException - Throws:
PortalException
-
getRepository
@Transactional(propagation=SUPPORTS, readOnly=true) Repository getRepository(long groupId, String name, String portletId) throws PortalException - Throws:
PortalException
-
getRepositoryByExternalReferenceCode
@Transactional(propagation=SUPPORTS, readOnly=true) Repository getRepositoryByExternalReferenceCode(String externalReferenceCode, long groupId) throws PortalException - Throws:
PortalException
-
getRepositoryByUuidAndGroupId
@Transactional(propagation=SUPPORTS, readOnly=true) Repository getRepositoryByUuidAndGroupId(String uuid, long groupId) throws PortalException Returns the repository matching the UUID and group.- Parameters:
uuid
- the repository's UUIDgroupId
- the primary key of the group- Returns:
- the matching repository
- Throws:
PortalException
- if a matching repository could not be found
-
getTypeSettingsProperties
@Transactional(propagation=SUPPORTS, readOnly=true) UnicodeProperties getTypeSettingsProperties(long repositoryId) throws PortalException - Throws:
PortalException
-
updateRepository
- Throws:
PortalException
-
updateRepository
void updateRepository(long repositoryId, UnicodeProperties typeSettingsUnicodeProperties) throws PortalException - Throws:
PortalException
-
updateRepository
Updates the repository in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.Important: Inspect RepositoryLocalServiceImpl 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:
repository
- the repository- Returns:
- the repository that was updated
-
getCTPersistence
- Specified by:
getCTPersistence
in interfaceCTService<Repository>
-
getModelClass
- Specified by:
getModelClass
in interfaceCTService<Repository>
-
updateWithUnsafeFunction
@Transactional(rollbackFor=java.lang.Throwable.class) <R,E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<CTPersistence<Repository>, R, throws EE> updateUnsafeFunction) - Specified by:
updateWithUnsafeFunction
in interfaceCTService<Repository>
- Throws:
E extends Throwable
-