|
6 | 6 | */
|
7 | 7 | package org.hibernate.engine.internal;
|
8 | 8 |
|
9 |
| -import org.hibernate.Remove; |
10 | 9 | import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
11 | 10 | import org.hibernate.internal.CoreMessageLogger;
|
12 | 11 | import org.hibernate.metamodel.mapping.EntityVersionMapping;
|
@@ -86,44 +85,13 @@ public static boolean seedVersion(
|
86 | 85 | }
|
87 | 86 | }
|
88 | 87 |
|
89 |
| - /** |
90 |
| - * Create an initial optimistic locking value according the {@link VersionJavaType} |
91 |
| - * contract for the version property <em>if required</em> and inject it into the |
92 |
| - * snapshot state. |
93 |
| - * |
94 |
| - * @param fields The current snapshot state |
95 |
| - * @param versionProperty The index of the version property |
96 |
| - * @param versionMapping The version mapping |
97 |
| - * @param session The originating session |
98 |
| - * @return True if we injected a new version value into the fields array; false |
99 |
| - * otherwise. |
100 |
| - * |
101 |
| - * @deprecated Use {@link #seedVersion(Object, Object[], EntityPersister, SharedSessionContractImplementor)} |
102 |
| - */ |
103 |
| - @Deprecated(since = "6.2") @Remove |
104 |
| - public static boolean seedVersion( |
105 |
| - Object[] fields, |
106 |
| - int versionProperty, |
107 |
| - EntityVersionMapping versionMapping, |
108 |
| - SharedSessionContractImplementor session) { |
109 |
| - final Object initialVersion = fields[versionProperty]; |
110 |
| - if ( isNullInitialVersion( initialVersion ) ) { |
111 |
| - fields[versionProperty] = seed( versionMapping, session ); |
112 |
| - return true; |
113 |
| - } |
114 |
| - else { |
115 |
| - LOG.tracev( "Using initial version: {0}", initialVersion ); |
116 |
| - return false; |
117 |
| - } |
118 |
| - } |
119 |
| - |
120 | 88 | /**
|
121 | 89 | * Determines if the value of the assigned version property should be considered
|
122 | 90 | * a "null" value, that is, if it is literally {@code null}, or if it is a negative
|
123 | 91 | * integer.
|
124 | 92 | *
|
125 | 93 | * @param initialVersion The value initially assigned to a version property
|
126 |
| - * @return {@code} if the value shoudl be considered null for this purpose |
| 94 | + * @return {@code} if the value should be considered null for this purpose |
127 | 95 | */
|
128 | 96 | public static boolean isNullInitialVersion(Object initialVersion) {
|
129 | 97 | return initialVersion == null
|
|
0 commit comments