Schnittstelle SpringDataUtil

Alle bekannten Implementierungsklassen:
JpaSpringDataUtil

public interface SpringDataUtil
Utility to handle Spring data repositories. A string identifier is expected for workflow entities.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <I> I
    getId(Object entity)
    Determine the entity's object identifier.
    getIdType(Class<?> type)
    Determine the entity's object identifier's type.
    <O> org.springframework.data.repository.CrudRepository<O,Object>
    Determine the repository for the given type.
    <O> org.springframework.data.repository.CrudRepository<? super O,Object>
    getRepository(O entity)
    Determine the repository for the given object.
    <O> boolean
    isPersistedEntity(Class<O> entityClass, O entity)
    Determines whether the given entity was loaded/persisted from/to DB before or it is a POJO (e.g. right before persisting).
    <O> O
    unproxy(O entity)
    Unproxy the entity.
  • Methodendetails

    • getRepository

      <O> org.springframework.data.repository.CrudRepository<? super O,Object> getRepository(O entity)
      Determine the repository for the given object.
      Typparameter:
      O - The entity's expected type.
      Parameter:
      entity - The entity
      Gibt zurück:
      The repository
    • getRepository

      <O> org.springframework.data.repository.CrudRepository<O,Object> getRepository(Class<O> type)
      Determine the repository for the given type.
      Typparameter:
      O - The entity's expected type.
      Parameter:
      type - The given entity's type.
      Gibt zurück:
      The repository
    • getId

      <I> I getId(Object entity)
      Determine the entity's object identifier.
      Parameter:
      entity - The entity
      Gibt zurück:
      The id
      Siehe auch:
      • Id
    • getIdType

      Class<?> getIdType(Class<?> type)
      Determine the entity's object identifier's type.
      Parameter:
      The - given entity's type.
      Gibt zurück:
      The entity's object identifier's type.
    • unproxy

      <O> O unproxy(O entity)
      Unproxy the entity. This forces to load data if the proxy is not yet initialized.
      Typparameter:
      O - The entity's type
      Parameter:
      entity - The entity
      Gibt zurück:
      The initialized entity
    • isPersistedEntity

      <O> boolean isPersistedEntity(Class<O> entityClass, O entity)
      Determines whether the given entity was loaded/persisted from/to DB before or it is a POJO (e.g. right before persisting).
      Typparameter:
      O - the entity's type
      Parameter:
      entityClass - The entity's class
      entity - The entity
      Gibt zurück:
      Entity was loaded/persisted from/to DB before