Klasse JpaSpringDataUtil

java.lang.Object
io.vanillabp.springboot.utils.JpaSpringDataUtil
Alle implementierten Schnittstellen:
SpringDataUtil

public class JpaSpringDataUtil extends Object implements SpringDataUtil
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    JpaSpringDataUtil(org.springframework.context.ApplicationContext applicationContext, org.springframework.data.jpa.repository.JpaContext jpaContext, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean containerEntityManagerFactoryBean)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <I> I
    getId(Object domainEntity)
    Determine the entity's object identifier.
    getIdType(Class<?> type)
    Determine the entity's object identifier's type.
    <O> org.springframework.data.jpa.repository.JpaRepository<O,Object>
    Determine the repository for the given type.
    <O> org.springframework.data.jpa.repository.JpaRepository<? super O,Object>
    getRepository(O object)
    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.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • JpaSpringDataUtil

      public JpaSpringDataUtil(org.springframework.context.ApplicationContext applicationContext, org.springframework.data.jpa.repository.JpaContext jpaContext, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean containerEntityManagerFactoryBean)
  • Methodendetails

    • getRepository

      public <O> org.springframework.data.jpa.repository.JpaRepository<? super O,Object> getRepository(O object)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Determine the repository for the given object.
      Angegeben von:
      getRepository in Schnittstelle SpringDataUtil
      Typparameter:
      O - The entity's expected type.
      Parameter:
      object - The entity
      Gibt zurück:
      The repository
    • getRepository

      public <O> org.springframework.data.jpa.repository.JpaRepository<O,Object> getRepository(Class<O> type)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Determine the repository for the given type.
      Angegeben von:
      getRepository in Schnittstelle SpringDataUtil
      Typparameter:
      O - The entity's expected type.
      Parameter:
      type - The given entity's type.
      Gibt zurück:
      The repository
    • getIdType

      public Class<?> getIdType(Class<?> type)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Determine the entity's object identifier's type.
      Angegeben von:
      getIdType in Schnittstelle SpringDataUtil
      Gibt zurück:
      The entity's object identifier's type.
    • getId

      public <I> I getId(Object domainEntity)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Determine the entity's object identifier.
      Angegeben von:
      getId in Schnittstelle SpringDataUtil
      Parameter:
      domainEntity - The entity
      Gibt zurück:
      The id
      Siehe auch:
      • Id
    • isPersistedEntity

      public <O> boolean isPersistedEntity(Class<O> entityClass, O entity)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Determines whether the given entity was loaded/persisted from/to DB before or it is a POJO (e.g. right before persisting).
      Angegeben von:
      isPersistedEntity in Schnittstelle SpringDataUtil
      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
    • unproxy

      public <O> O unproxy(O entity)
      Beschreibung aus Schnittstelle kopiert: SpringDataUtil
      Unproxy the entity. This forces to load data if the proxy is not yet initialized.
      Angegeben von:
      unproxy in Schnittstelle SpringDataUtil
      Typparameter:
      O - The entity's type
      Parameter:
      entity - The entity
      Gibt zurück:
      The initialized entity