Package io.vanillabp.springboot.adapter
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 TypMethodeBeschreibung<I> IDetermine the entity's object identifier.Class<?>Determine the entity's object identifier's type.<O> org.springframework.data.repository.CrudRepository<O,Object> getRepository(Class<O> type) 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> 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.
-
Methodendetails
-
getRepository
Determine the repository for the given object.- Typparameter:
O- The entity's expected type.- Parameter:
entity- The entity- Gibt zurück:
- The repository
-
getRepository
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
Determine the entity's object identifier.- Parameter:
entity- The entity- Gibt zurück:
- The id
- Siehe auch:
-
Id
-
getIdType
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
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 classentity- The entity- Gibt zurück:
- Entity was loaded/persisted from/to DB before
-