Package org.hibernate.dialect
Class StructHelper
- java.lang.Object
-
- org.hibernate.dialect.StructHelper
-
@Internal public class StructHelper extends Object
A Helper for serializing and deserializing struct, based on anEmbeddableMappingType
.
-
-
Constructor Summary
Constructors Constructor Description StructHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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, SessionFactoryImplementor sessionFactory)
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.
-
-
-
Method Detail
-
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, SessionFactoryImplementor sessionFactory)
-
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
public static int getJdbcValueCount(MappingType mappedType)
-
-