Top Description Constructors Methods
org.hibernate.dialect

public Class StructHelper

extends Object
Class Inheritance
Annotations
@Internal
Imports
java.sql.SQLException, org.hibernate.Internal, org.hibernate.metamodel.mapping.AttributeMapping, .EmbeddableMappingType, .JdbcMapping, .MappingType, org.hibernate.type.descriptor.WrapperOptions, org.hibernate.type.descriptor.java.JavaType, org.hibernate.type.descriptor.jdbc.AggregateJdbcType

A Helper for serializing and deserializing struct, based on an EmbeddableMappingType.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Object[]
getAttributeValues(EmbeddableMappingType embeddableMappingType, Object[] rawJdbcValues, WrapperOptions options)

public static int
public static Object[]
getJdbcValues(EmbeddableMappingType embeddableMappingType, int[] orderMapping, Object[] attributeValues, WrapperOptions options)

private static int
injectAttributeValue(AttributeMapping attributeMapping, Object[] attributeValues, int attributeIndex, Object[] rawJdbcValues, int jdbcIndex, WrapperOptions options)

private static int
injectJdbcValue(AttributeMapping attributeMapping, Object[] attributeValues, int attributeIndex, Object[] jdbcValues, int jdbcIndex, WrapperOptions options)

public static void
orderJdbcValues(EmbeddableMappingType embeddableMappingType, int[] inverseMapping, Object[] sourceJdbcValues, Object[] targetJdbcValues)

The sourceJdbcValues array is ordered according to the expected physical order, as given through the argument order of @Instantiator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StructHelperback to summary
public StructHelper()

Method Detail

getAttributeValuesback to summary
public static Object[] getAttributeValues(EmbeddableMappingType embeddableMappingType, Object[] rawJdbcValues, WrapperOptions options) throws SQLException
getJdbcValueCountback to summary
public static int getJdbcValueCount(MappingType mappedType)
getJdbcValuesback to summary
public static Object[] getJdbcValues(EmbeddableMappingType embeddableMappingType, int[] orderMapping, Object[] attributeValues, WrapperOptions options) throws SQLException
injectAttributeValueback to summary
private static int injectAttributeValue(AttributeMapping attributeMapping, Object[] attributeValues, int attributeIndex, Object[] rawJdbcValues, int jdbcIndex, WrapperOptions options) throws SQLException
injectJdbcValueback to summary
private static int injectJdbcValue(AttributeMapping attributeMapping, Object[] attributeValues, int attributeIndex, Object[] jdbcValues, int jdbcIndex, WrapperOptions options) throws SQLException
orderJdbcValuesback to summary
public static void orderJdbcValues(EmbeddableMappingType embeddableMappingType, int[] inverseMapping, Object[] sourceJdbcValues, Object[] targetJdbcValues)

The sourceJdbcValues array is ordered according to the expected physical order, as given through the argument order of @Instantiator. The targetJdbcValues array should be ordered according to the Hibernate internal ordering, which is based on property name. This method copies from sourceJdbcValues to targetJdbcValues according to the ordering.