Class WindowDAOImpl

java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<WindowEntity,Long>
org.exoplatform.portal.mop.dao.AbstractDAO<WindowEntity>
org.exoplatform.portal.mop.dao.WindowDAOImpl
All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<WindowEntity,Long>, WindowDAO

public class WindowDAOImpl extends AbstractDAO<WindowEntity> implements WindowDAO
  • Constructor Details

    • WindowDAOImpl

      public WindowDAOImpl()
  • Method Details

    • find

      public WindowEntity find(Long id)
      Specified by:
      find in interface org.exoplatform.commons.api.persistence.GenericDAO<WindowEntity,Long>
      Overrides:
      find in class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<WindowEntity,Long>
    • findCustomization

      public Optional<byte[]> findCustomization(Long id)
      Description copied from interface: WindowDAO
      Reads the customization of a window from its row, never from the window the persistence context holds
      Specified by:
      findCustomization in interface WindowDAO
      Parameters:
      id - the window's id
      Returns:
      the window's customization, an empty array when it has none, empty when no window has this id
    • existsById

      public boolean existsById(Long id)
      Specified by:
      existsById in interface WindowDAO
      Parameters:
      id - the window's id
      Returns:
      true when the window's row exists, never read from the window the persistence context holds, its customization not read
    • updateCustomization

      public int updateCustomization(Long id, byte[] customization)
      Description copied from interface: WindowDAO
      Writes the customization of a window to its row, and to that column alone: the other columns keep what is committed. The window the persistence context holds, when it holds one, is read again from the row
      Specified by:
      updateCustomization in interface WindowDAO
      Parameters:
      id - the window's id
      customization - the window's customization, null for none
      Returns:
      the number of windows written, 0 when no window has this id
    • findIdsByContentIds

      public List<Long> findIdsByContentIds(List<String> contentIds, int offset, int limit)
      Specified by:
      findIdsByContentIds in interface WindowDAO
    • updateContentId

      public int updateContentId(String oldContentId, String newContentId)
      Specified by:
      updateContentId in interface WindowDAO
    • deleteByContentId

      public int deleteByContentId(String contentId)
      Specified by:
      deleteByContentId in interface WindowDAO
    • findByIds

      public List<WindowEntity> findByIds(List<Long> ids)
      Specified by:
      findByIds in interface WindowDAO
    • deleteById

      public void deleteById(Long id)
      Specified by:
      deleteById in interface WindowDAO