Interface SyncCascadeOperations.SyncCascadeOperationsHelper<Ctx extends OperationContext>
-
- Type Parameters:
Ctx- The operation context.
- All Known Implementing Classes:
DefaultJdbcRepositoryOperations,DefaultMongoRepositoryOperations
- Enclosing class:
- SyncCascadeOperations<Ctx extends OperationContext>
public static interface SyncCascadeOperations.SyncCascadeOperationsHelper<Ctx extends OperationContext>The cascade operations helper.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanisSupportsBatchDelete(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)Is supports batch delete.default booleanisSupportsBatchInsert(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)Is supports batch insert.default booleanisSupportsBatchUpdate(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)Is supports batch update.<T> java.util.List<T>persistBatch(Ctx ctx, java.lang.Iterable<T> entityValues, RuntimePersistentEntity<T> persistentEntity, java.util.function.Predicate<T> predicate)Persist multiple entities in batch during cascade.voidpersistManyAssociation(Ctx ctx, RuntimeAssociation runtimeAssociation, java.lang.Object parentEntityValue, RuntimePersistentEntity<java.lang.Object> parentPersistentEntity, java.lang.Object childEntityValue, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)Persist JOIN table relationship.voidpersistManyAssociationBatch(Ctx ctx, RuntimeAssociation runtimeAssociation, java.lang.Object parentEntityValue, RuntimePersistentEntity<java.lang.Object> parentPersistentEntity, java.lang.Iterable<java.lang.Object> childEntityValues, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)Persist JOIN table relationships in batch.<T> TpersistOne(Ctx ctx, T entityValue, RuntimePersistentEntity<T> persistentEntity)Persist one entity during cascade.<T> TupdateOne(Ctx ctx, T entityValue, RuntimePersistentEntity<T> persistentEntity)Update one entity during cascade.
-
-
-
Method Detail
-
isSupportsBatchInsert
default boolean isSupportsBatchInsert(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)
Is supports batch insert.- Parameters:
ctx- The contextpersistentEntity- The persistent entity- Returns:
- True if supports
-
isSupportsBatchUpdate
default boolean isSupportsBatchUpdate(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)
Is supports batch update.- Parameters:
ctx- The contextpersistentEntity- The persistent entity- Returns:
- True if supports
-
isSupportsBatchDelete
default boolean isSupportsBatchDelete(Ctx ctx, RuntimePersistentEntity<?> persistentEntity)
Is supports batch delete.- Parameters:
ctx- The contextpersistentEntity- The persistent entity- Returns:
- True if supports
-
persistOne
<T> T persistOne(Ctx ctx, T entityValue, RuntimePersistentEntity<T> persistentEntity)
Persist one entity during cascade.- Type Parameters:
T- The entity type- Parameters:
ctx- The contextentityValue- The entity valuepersistentEntity- The persistent entity- Returns:
- The entity value
-
persistBatch
<T> java.util.List<T> persistBatch(Ctx ctx, java.lang.Iterable<T> entityValues, RuntimePersistentEntity<T> persistentEntity, java.util.function.Predicate<T> predicate)
Persist multiple entities in batch during cascade.- Type Parameters:
T- The entity type- Parameters:
ctx- The contextentityValues- The entity valuespersistentEntity- The persistent entitypredicate- The veto predicate- Returns:
- The entity values
-
updateOne
<T> T updateOne(Ctx ctx, T entityValue, RuntimePersistentEntity<T> persistentEntity)
Update one entity during cascade.- Type Parameters:
T- The entity type- Parameters:
ctx- The contextentityValue- The entity valuepersistentEntity- The persistent entity- Returns:
- The entity value
-
persistManyAssociation
void persistManyAssociation(Ctx ctx, RuntimeAssociation runtimeAssociation, java.lang.Object parentEntityValue, RuntimePersistentEntity<java.lang.Object> parentPersistentEntity, java.lang.Object childEntityValue, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)
Persist JOIN table relationship.- Parameters:
ctx- The contextruntimeAssociation- The associationparentEntityValue- The parent entity valueparentPersistentEntity- The parent persistent entitychildEntityValue- The child entity valuechildPersistentEntity- The child persistent entity
-
persistManyAssociationBatch
void persistManyAssociationBatch(Ctx ctx, RuntimeAssociation runtimeAssociation, java.lang.Object parentEntityValue, RuntimePersistentEntity<java.lang.Object> parentPersistentEntity, java.lang.Iterable<java.lang.Object> childEntityValues, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)
Persist JOIN table relationships in batch.- Parameters:
ctx- The contextruntimeAssociation- The associationparentEntityValue- The parent entity valueparentPersistentEntity- The parent persistent entitychildEntityValues- The child entity valueschildPersistentEntity- The child persistent entity
-
-