Package org.hibernate.dialect
Class StructHelper
java.lang.Object
org.hibernate.dialect.StructHelper
A Helper for serializing and deserializing struct, based on an
EmbeddableMappingType
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StructAttributeValues
getAttributeValues
(EmbeddableMappingType embeddableMappingType, Object[] rawJdbcValues, WrapperOptions options) static ValuedModelPart
getEmbeddedPart
(EmbeddableMappingType embeddableMappingType, int position) static int
getJdbcValueCount
(MappingType mappedType) static Object[]
getJdbcValues
(EmbeddableMappingType embeddableMappingType, int[] orderMapping, Object domainValue, WrapperOptions options) static Object
instantiate
(EmbeddableMappingType embeddableMappingType, StructAttributeValues attributeValues) static void
orderJdbcValues
(EmbeddableMappingType embeddableMappingType, int[] inverseMapping, Object[] sourceJdbcValues, Object[] targetJdbcValues) ThesourceJdbcValues
array is ordered according to the expected physical order, as given through the argument order of @Instantiator.
-
Constructor Details
-
StructHelper
public StructHelper()
-
-
Method Details
-
getAttributeValues
public static StructAttributeValues getAttributeValues(EmbeddableMappingType embeddableMappingType, Object[] rawJdbcValues, WrapperOptions options) throws SQLException - Throws:
SQLException
-
getJdbcValues
public static Object[] getJdbcValues(EmbeddableMappingType embeddableMappingType, int[] orderMapping, Object domainValue, WrapperOptions options) throws SQLException - Throws:
SQLException
-
instantiate
public static Object instantiate(EmbeddableMappingType embeddableMappingType, StructAttributeValues attributeValues) -
getEmbeddedPart
public static ValuedModelPart getEmbeddedPart(EmbeddableMappingType embeddableMappingType, int position) -
orderJdbcValues
public static void orderJdbcValues(EmbeddableMappingType embeddableMappingType, int[] inverseMapping, Object[] sourceJdbcValues, Object[] targetJdbcValues) ThesourceJdbcValues
array is ordered according to the expected physical order, as given through the argument order of @Instantiator. ThetargetJdbcValues
array should be ordered according to the Hibernate internal ordering, which is based on property name. This method copies fromsourceJdbcValues
totargetJdbcValues
according to the ordering. -
getJdbcValueCount
-