Interface SpringDataUtil

  • All Known Implementing Classes:
    JpaSpringDataUtil

    public interface SpringDataUtil
    Utility to handle Spring data repositories. A string identifier is expected for workflow entities.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getId​(java.lang.Object entity)
      Determine the entity's object identifier.
      <O> org.springframework.data.repository.CrudRepository<O,​java.lang.String> getRepository​(java.lang.Class<O> type)
      Determine the repository for the given type.
      <O> org.springframework.data.repository.CrudRepository<? super O,​java.lang.String> getRepository​(O entity)
      Determine the repository for the given object.
      <O> O unproxy​(O entity)
      Unproxy the entity.
    • Method Detail

      • getRepository

        <O> org.springframework.data.repository.CrudRepository<? super O,​java.lang.String> getRepository​(O entity)
        Determine the repository for the given object.
        Type Parameters:
        O - The entity's expected type.
        Parameters:
        entity - The entity
        Returns:
        The repository
      • getRepository

        <O> org.springframework.data.repository.CrudRepository<O,​java.lang.String> getRepository​(java.lang.Class<O> type)
        Determine the repository for the given type.
        Type Parameters:
        O - The entity's expected type.
        Parameters:
        object - The given entity's type.
        Returns:
        The repository
      • getId

        java.lang.String getId​(java.lang.Object entity)
        Determine the entity's object identifier.
        Parameters:
        entity - The entity
        Returns:
        The id
        See Also:
        Id
      • unproxy

        <O> O unproxy​(O entity)
        Unproxy the entity. This forces to load data if the proxy is not yet initialized.
        Type Parameters:
        O - The entity's type
        Parameters:
        entity - The entity
        Returns:
        The initialized entity