Class AMImageEntryLocalServiceWrapper

java.lang.Object
com.liferay.adaptive.media.image.service.AMImageEntryLocalServiceWrapper
All Implemented Interfaces:
AMImageEntryLocalService, com.liferay.portal.kernel.service.BaseLocalService, com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>, com.liferay.portal.kernel.service.PersistedModelLocalService, com.liferay.portal.kernel.service.ServiceWrapper<AMImageEntryLocalService>

public class AMImageEntryLocalServiceWrapper extends Object implements AMImageEntryLocalService, com.liferay.portal.kernel.service.ServiceWrapper<AMImageEntryLocalService>
Provides a wrapper for AMImageEntryLocalService.
See Also:
Generated:
  • Constructor Details

    • AMImageEntryLocalServiceWrapper

      public AMImageEntryLocalServiceWrapper()
    • AMImageEntryLocalServiceWrapper

      public AMImageEntryLocalServiceWrapper(AMImageEntryLocalService amImageEntryLocalService)
  • Method Details

    • addAMImageEntry

      public AMImageEntry addAMImageEntry(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion, int height, int width, InputStream inputStream, long size) throws com.liferay.portal.kernel.exception.PortalException
      Adds an adaptive media image entry in the database and stores the image bytes in the file store.
      Specified by:
      addAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageConfigurationEntry - the configuration used to create the adaptive media image
      fileVersion - the file version used to create the adaptive media image
      height - the adaptive media image's height
      width - the adaptive media image's width
      inputStream - the adaptive media image's input stream to store in the file store
      size - the adaptive media image's size
      Returns:
      the adaptive media image
      Throws:
      PortalException - if an adaptive media image already exists for the file version and configuration
      com.liferay.portal.kernel.exception.PortalException
    • addAMImageEntry

      public AMImageEntry addAMImageEntry(AMImageEntry amImageEntry)
      Adds the am image entry to the database. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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.

      Specified by:
      addAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was added
    • createAMImageEntry

      public AMImageEntry createAMImageEntry(long amImageEntryId)
      Creates a new am image entry with the primary key. Does not add the am image entry to the database.
      Specified by:
      createAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntryId - the primary key for the new am image entry
      Returns:
      the new am image entry
    • createPersistedModel

      public com.liferay.portal.kernel.model.PersistedModel createPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      createPersistedModel in interface AMImageEntryLocalService
      Specified by:
      createPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      PortalException
      com.liferay.portal.kernel.exception.PortalException
    • deleteAMImageEntries

      public void deleteAMImageEntries(long companyId, AMImageConfigurationEntry amImageConfigurationEntry)
      Deletes all the adaptive media images generated for the configuration in the company. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Specified by:
      deleteAMImageEntries in interface AMImageEntryLocalService
      Parameters:
      companyId - the primary key of the company
      amImageConfigurationEntry - the configuration used to create the adaptive media image
    • deleteAMImageEntry

      public AMImageEntry deleteAMImageEntry(AMImageEntry amImageEntry)
      Deletes the am image entry from the database. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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.

      Specified by:
      deleteAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was removed
    • deleteAMImageEntry

      public AMImageEntry deleteAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the am image entry with the primary key from the database. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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.

      Specified by:
      deleteAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntryId - the primary key of the am image entry
      Returns:
      the am image entry that was removed
      Throws:
      PortalException - if a am image entry with the primary key could not be found
      com.liferay.portal.kernel.exception.PortalException
    • deleteAMImageEntryFileVersion

      public void deleteAMImageEntryFileVersion(com.liferay.portal.kernel.repository.model.FileVersion fileVersion) throws com.liferay.portal.kernel.exception.PortalException
      Deletes all the adaptive media images generated for a file version. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Specified by:
      deleteAMImageEntryFileVersion in interface AMImageEntryLocalService
      Parameters:
      fileVersion - the file version
      Throws:
      PortalException - if the file version was not found
      com.liferay.portal.kernel.exception.PortalException
    • deleteAMImageEntryFileVersion

      public void deleteAMImageEntryFileVersion(String configurationUuid, long fileVersionId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes adaptive media images generated for a file version under a given configuration. This method deletes both the adaptive media image entry from the database and the bytes from the file store.
      Specified by:
      deleteAMImageEntryFileVersion in interface AMImageEntryLocalService
      Parameters:
      configurationUuid - the configuration UUID
      fileVersionId - the primary key of the file version
      Throws:
      PortalException - if the file version was not found
      com.liferay.portal.kernel.exception.PortalException
    • deletePersistedModel

      public com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(com.liferay.portal.kernel.model.PersistedModel persistedModel) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deletePersistedModel in interface AMImageEntryLocalService
      Specified by:
      deletePersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      PortalException
      com.liferay.portal.kernel.exception.PortalException
    • dslQuery

      public <T> T dslQuery(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQuery in interface AMImageEntryLocalService
      Specified by:
      dslQuery in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dslQueryCount

      public int dslQueryCount(com.liferay.petra.sql.dsl.query.DSLQuery dslQuery)
      Specified by:
      dslQueryCount in interface AMImageEntryLocalService
      Specified by:
      dslQueryCount in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • dynamicQuery

      public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery()
      Specified by:
      dynamicQuery in interface AMImageEntryLocalService
    • dynamicQuery

      public <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Performs a dynamic query on the database and returns the matching rows.
      Specified by:
      dynamicQuery in interface AMImageEntryLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the matching rows
    • dynamicQuery

      public <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      Specified by:
      dynamicQuery in interface AMImageEntryLocalService
      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 <T> List<T> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      Specified by:
      dynamicQuery in interface AMImageEntryLocalService
      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 long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface AMImageEntryLocalService
      Parameters:
      dynamicQuery - the dynamic query
      Returns:
      the number of rows matching the dynamic query
    • dynamicQueryCount

      public long dynamicQueryCount(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, com.liferay.portal.kernel.dao.orm.Projection projection)
      Returns the number of rows matching the dynamic query.
      Specified by:
      dynamicQueryCount in interface AMImageEntryLocalService
      Parameters:
      dynamicQuery - the dynamic query
      projection - the projection to apply to the query
      Returns:
      the number of rows matching the dynamic query
    • fetchAMImageEntry

      public AMImageEntry fetchAMImageEntry(long amImageEntryId)
      Specified by:
      fetchAMImageEntry in interface AMImageEntryLocalService
    • fetchAMImageEntry

      public AMImageEntry fetchAMImageEntry(String configurationUuid, long fileVersionId)
      Returns the adaptive media image entry generated for the configuration and file version.
      Specified by:
      fetchAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      fileVersionId - the primary key of the file version
      Returns:
      the matching adaptive media image entry, or null if a matching adaptive media image entry could not be found
    • fetchAMImageEntryByUuidAndGroupId

      public AMImageEntry fetchAMImageEntryByUuidAndGroupId(String uuid, long groupId)
      Returns the am image entry matching the UUID and group.
      Specified by:
      fetchAMImageEntryByUuidAndGroupId in interface AMImageEntryLocalService
      Parameters:
      uuid - the am image entry's UUID
      groupId - the primary key of the group
      Returns:
      the matching am image entry, or null if a matching am image entry could not be found
    • getActionableDynamicQuery

      public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery()
      Specified by:
      getActionableDynamicQuery in interface AMImageEntryLocalService
    • getAMImageEntries

      public List<AMImageEntry> getAMImageEntries(int start, int end)
      Returns a range of all the am image entries.

      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 com.liferay.portal.kernel.dao.orm.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, then the query will include the default ORDER BY logic from com.liferay.adaptive.media.image.model.impl.AMImageEntryModelImpl.

      Specified by:
      getAMImageEntries in interface AMImageEntryLocalService
      Parameters:
      start - the lower bound of the range of am image entries
      end - the upper bound of the range of am image entries (not inclusive)
      Returns:
      the range of am image entries
    • getAMImageEntries

      public List<AMImageEntry> getAMImageEntries(long fileVersionId)
      Returns the list of adaptive media image entries generated for the file version.
      Specified by:
      getAMImageEntries in interface AMImageEntryLocalService
      Parameters:
      fileVersionId - the primary key of the file version
      Returns:
      the list of adaptive media image entries in the file version
    • getAMImageEntriesByUuidAndCompanyId

      public List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId)
      Returns all the am image entries matching the UUID and company.
      Specified by:
      getAMImageEntriesByUuidAndCompanyId in interface AMImageEntryLocalService
      Parameters:
      uuid - the UUID of the am image entries
      companyId - the primary key of the company
      Returns:
      the matching am image entries, or an empty list if no matches were found
    • getAMImageEntriesByUuidAndCompanyId

      public List<AMImageEntry> getAMImageEntriesByUuidAndCompanyId(String uuid, long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AMImageEntry> orderByComparator)
      Returns a range of am image entries matching the UUID and company.
      Specified by:
      getAMImageEntriesByUuidAndCompanyId in interface AMImageEntryLocalService
      Parameters:
      uuid - the UUID of the am image entries
      companyId - the primary key of the company
      start - the lower bound of the range of am image entries
      end - the upper bound of the range of am image entries (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the range of matching am image entries, or an empty list if no matches were found
    • getAMImageEntriesCount

      public int getAMImageEntriesCount()
      Returns the number of am image entries.
      Specified by:
      getAMImageEntriesCount in interface AMImageEntryLocalService
      Returns:
      the number of am image entries
    • getAMImageEntriesCount

      public int getAMImageEntriesCount(long companyId, String configurationUuid)
      Returns the number of adaptive media image entries generated for the configuration in the company.
      Specified by:
      getAMImageEntriesCount in interface AMImageEntryLocalService
      Parameters:
      companyId - the primary key of the company
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      Returns:
      the number of adaptive media image entries in the company for the configuration
    • getAMImageEntry

      public AMImageEntry getAMImageEntry(long amImageEntryId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the am image entry with the primary key.
      Specified by:
      getAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntryId - the primary key of the am image entry
      Returns:
      the am image entry
      Throws:
      PortalException - if a am image entry with the primary key could not be found
      com.liferay.portal.kernel.exception.PortalException
    • getAMImageEntryByUuidAndGroupId

      public AMImageEntry getAMImageEntryByUuidAndGroupId(String uuid, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the am image entry matching the UUID and group.
      Specified by:
      getAMImageEntryByUuidAndGroupId in interface AMImageEntryLocalService
      Parameters:
      uuid - the am image entry's UUID
      groupId - the primary key of the group
      Returns:
      the matching am image entry
      Throws:
      PortalException - if a matching am image entry could not be found
      com.liferay.portal.kernel.exception.PortalException
    • getAMImageEntryContentStream

      public InputStream getAMImageEntryContentStream(AMImageConfigurationEntry amImageConfigurationEntry, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
      Returns the input stream of the adaptive media image generated for a file version and configuration.
      Specified by:
      getAMImageEntryContentStream in interface AMImageEntryLocalService
      Parameters:
      amImageConfigurationEntry - the configuration used to create the adaptive media image
      fileVersion - the file version used to create the adaptive media image
      Returns:
      the input stream of the adaptive media image generated for a file version and configuration
    • getExpectedAMImageEntriesCount

      public int getExpectedAMImageEntriesCount(long companyId)
      Returns the total number of adaptive media images that are expected to be in a company once they are generated. The number of adaptive media images could be less if there are images that haven't generated the adaptive media image yet.
      Specified by:
      getExpectedAMImageEntriesCount in interface AMImageEntryLocalService
      Parameters:
      companyId - the primary key of the company
      Returns:
      the number of expected adaptive media images for a company
    • getIndexableActionableDynamicQuery

      public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
      Specified by:
      getIndexableActionableDynamicQuery in interface AMImageEntryLocalService
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface AMImageEntryLocalService
      Returns:
      the OSGi service identifier
    • getPercentage

      public int getPercentage(long companyId, String configurationUuid)
      Returns the percentage of images that have an adaptive media image generated based on the expected number of adaptive media images for a configuration in a company.
      Specified by:
      getPercentage in interface AMImageEntryLocalService
      Parameters:
      companyId - the primary key of the company
      configurationUuid - the UUID of the configuration used to create the adaptive media image
      Returns:
      the percentage of images that have an adaptive media image out of the expected adaptive media images
    • getPercentage

      public int getPercentage(long companyId, String configurationUuid, int expectedAMImageEntriesCount)
      Specified by:
      getPercentage in interface AMImageEntryLocalService
    • getPersistedModel

      public com.liferay.portal.kernel.model.PersistedModel getPersistedModel(Serializable primaryKeyObj) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getPersistedModel in interface AMImageEntryLocalService
      Specified by:
      getPersistedModel in interface com.liferay.portal.kernel.service.PersistedModelLocalService
      Throws:
      PortalException
      com.liferay.portal.kernel.exception.PortalException
    • hasAMImageEntryContent

      public boolean hasAMImageEntryContent(String configurationUuid, com.liferay.portal.kernel.repository.model.FileVersion fileVersion)
      Specified by:
      hasAMImageEntryContent in interface AMImageEntryLocalService
    • updateAMImageEntry

      public AMImageEntry updateAMImageEntry(AMImageEntry amImageEntry)
      Updates the am image entry in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

      Important: Inspect AMImageEntryLocalServiceImpl 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.

      Specified by:
      updateAMImageEntry in interface AMImageEntryLocalService
      Parameters:
      amImageEntry - the am image entry
      Returns:
      the am image entry that was updated
    • getBasePersistence

      public com.liferay.portal.kernel.service.persistence.BasePersistence<?> getBasePersistence()
      Specified by:
      getBasePersistence in interface com.liferay.portal.kernel.service.PersistedModelLocalService
    • getCTPersistence

      public com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry> getCTPersistence()
      Specified by:
      getCTPersistence in interface AMImageEntryLocalService
      Specified by:
      getCTPersistence in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
    • getModelClass

      public Class<AMImageEntry> getModelClass()
      Specified by:
      getModelClass in interface AMImageEntryLocalService
      Specified by:
      getModelClass in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
    • updateWithUnsafeFunction

      public <R, E extends Throwable> R updateWithUnsafeFunction(com.liferay.petra.function.UnsafeFunction<com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence<AMImageEntry>,R,E> updateUnsafeFunction) throws E
      Specified by:
      updateWithUnsafeFunction in interface AMImageEntryLocalService
      Specified by:
      updateWithUnsafeFunction in interface com.liferay.portal.kernel.service.change.tracking.CTService<AMImageEntry>
      Throws:
      E extends Throwable
    • getWrappedService

      public AMImageEntryLocalService getWrappedService()
      Specified by:
      getWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<AMImageEntryLocalService>
    • setWrappedService

      public void setWrappedService(AMImageEntryLocalService amImageEntryLocalService)
      Specified by:
      setWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<AMImageEntryLocalService>