Skip to content

Commit cca52f8

Browse files
committed
HHH-18410 Make use of getter/setter cache as much as possible
1 parent cb01ad6 commit cca52f8

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -680,47 +680,6 @@ public <X, Y> int breakDownJdbcValues(
680680
return span;
681681
}
682682

683-
@Override
684-
public <X, Y> int forEachJdbcValue(
685-
Object value,
686-
int offset,
687-
X x,
688-
Y y,
689-
JdbcValuesBiConsumer<X, Y> valuesConsumer,
690-
SharedSessionContractImplementor session) {
691-
int span = 0;
692-
if ( value == null ) {
693-
for ( int i = 0; i < attributeMappings.size(); i++ ) {
694-
final AttributeMapping attributeMapping = attributeMappings.get( i );
695-
if ( attributeMapping instanceof PluralAttributeMapping ) {
696-
continue;
697-
}
698-
span += attributeMapping.forEachJdbcValue( null, span + offset, x, y, valuesConsumer, session );
699-
}
700-
if ( isPolymorphic() ) {
701-
span += discriminatorMapping.forEachJdbcValue( null, offset + span, x, y, valuesConsumer, session );
702-
}
703-
}
704-
else {
705-
final ConcreteEmbeddableType concreteEmbeddableType = findSubtypeBySubclass( value.getClass().getName() );
706-
for ( int i = 0; i < attributeMappings.size(); i++ ) {
707-
final AttributeMapping attributeMapping = attributeMappings.get( i );
708-
if ( attributeMapping instanceof PluralAttributeMapping ) {
709-
continue;
710-
}
711-
final Object attributeValue = concreteEmbeddableType == null || !concreteEmbeddableType.declaresAttribute( attributeMapping )
712-
? null
713-
: getValue( value, i );
714-
span += attributeMapping.forEachJdbcValue( attributeValue, span + offset, x, y, valuesConsumer, session );
715-
}
716-
if ( isPolymorphic() ) {
717-
final Object d = concreteEmbeddableType == null ? null : concreteEmbeddableType.getDiscriminatorValue();
718-
span += discriminatorMapping.forEachJdbcValue( d, offset + span, x, y, valuesConsumer, session );
719-
}
720-
}
721-
return span;
722-
}
723-
724683
@Override
725684
public <X, Y> int decompose(
726685
Object domainValue,

0 commit comments

Comments
 (0)