File tree 1 file changed +27
-0
lines changed
hibernate-core/src/main/java/org/hibernate/sql/model 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
package org .hibernate .sql .model ;
8
8
9
+ import java .util .function .BiConsumer ;
10
+ import java .util .function .BiFunction ;
11
+
9
12
import org .hibernate .engine .jdbc .mutation .internal .EntityMutationOperationGroup ;
10
13
11
14
/**
@@ -58,4 +61,28 @@ public interface MutationOperationGroup {
58
61
default EntityMutationOperationGroup asEntityMutationOperationGroup () {
59
62
return null ;
60
63
}
64
+
65
+ /**
66
+ * @deprecated Will be removed. Use the other methods to visit each operation.
67
+ */
68
+ @ Deprecated (forRemoval = true )
69
+ default <O extends MutationOperation > void forEachOperation (BiConsumer <Integer , O > action ) {
70
+ for ( int i = 0 ; i < getNumberOfOperations (); i ++ ) {
71
+ action .accept ( i , (O ) getOperation ( i ) );
72
+ }
73
+ }
74
+
75
+ /**
76
+ * @deprecated Will be removed. Use the other methods to visit each operation.
77
+ */
78
+ @ Deprecated (forRemoval = true )
79
+ default <O extends MutationOperation > boolean hasMatching (BiFunction <Integer , O , Boolean > matcher ) {
80
+ for ( int i = 0 ; i < getNumberOfOperations (); i ++ ) {
81
+ if ( matcher .apply ( i , (O ) getOperation ( i ) ) ) {
82
+ return true ;
83
+ }
84
+ }
85
+ return false ;
86
+ }
87
+
61
88
}
You can’t perform that action at this time.
0 commit comments