Package io.vanillabp.springboot.utils
Klasse JpaSpringDataUtil
java.lang.Object
io.vanillabp.springboot.utils.JpaSpringDataUtil
- Alle implementierten Schnittstellen:
SpringDataUtil
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungJpaSpringDataUtil(org.springframework.context.ApplicationContext applicationContext, org.springframework.data.jpa.repository.JpaContext jpaContext, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean containerEntityManagerFactoryBean) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<I> IDetermine the entity's object identifier.Class<?>Determine the entity's object identifier's type.<O> org.springframework.data.jpa.repository.JpaRepository<O,Object> getRepository(Class<O> type) 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> booleanisPersistedEntity(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> Ounproxy(O entity) Unproxy the entity.
-
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:SpringDataUtilDetermine the repository for the given object.- Angegeben von:
getRepositoryin SchnittstelleSpringDataUtil- 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:SpringDataUtilDetermine the repository for the given type.- Angegeben von:
getRepositoryin SchnittstelleSpringDataUtil- Typparameter:
O- The entity's expected type.- Parameter:
type- The given entity's type.- Gibt zurück:
- The repository
-
getIdType
Beschreibung aus Schnittstelle kopiert:SpringDataUtilDetermine the entity's object identifier's type.- Angegeben von:
getIdTypein SchnittstelleSpringDataUtil- Gibt zurück:
- The entity's object identifier's type.
-
getId
Beschreibung aus Schnittstelle kopiert:SpringDataUtilDetermine the entity's object identifier.- Angegeben von:
getIdin SchnittstelleSpringDataUtil- Parameter:
domainEntity- The entity- Gibt zurück:
- The id
- Siehe auch:
-
Id
-
isPersistedEntity
Beschreibung aus Schnittstelle kopiert:SpringDataUtilDetermines whether the given entity was loaded/persisted from/to DB before or it is a POJO (e.g. right before persisting).- Angegeben von:
isPersistedEntityin SchnittstelleSpringDataUtil- Typparameter:
O- the entity's type- Parameter:
entityClass- The entity's classentity- The entity- Gibt zurück:
- Entity was loaded/persisted from/to DB before
-
unproxy
public <O> O unproxy(O entity) Beschreibung aus Schnittstelle kopiert:SpringDataUtilUnproxy the entity. This forces to load data if the proxy is not yet initialized.- Angegeben von:
unproxyin SchnittstelleSpringDataUtil- Typparameter:
O- The entity's type- Parameter:
entity- The entity- Gibt zurück:
- The initialized entity
-