Class GeneratedValuesHelper
java.lang.Object
org.hibernate.generator.values.internal.GeneratedValuesHelper
Factory and helper methods for
GeneratedValuesMutationDelegate
framework.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateMappingProducer
(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId) Utility method that instantiates aJdbcValuesMappingProducer
so it can be cached by thedelegates
when they are instantiated.static BasicValuedModelPart
getActualGeneratedModelPart
(BasicValuedModelPart modelPart) static GeneratedValues
getGeneratedValues
(ResultSet resultSet, EntityPersister persister, EventType timing, SharedSessionContractImplementor session) Reads thegenerated values
for the specifiedResultSet
.getGeneratedValuesDelegate
(EntityPersister persister, EventType timing) Creates thedelegate
used to retrieve database generated values on mutation execution through e.g.static boolean
noCustomSql
(EntityPersister persister, EventType timing)
-
Constructor Details
-
GeneratedValuesHelper
public GeneratedValuesHelper()
-
-
Method Details
-
createMappingProducer
public static GeneratedValuesMappingProducer createMappingProducer(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId) Utility method that instantiates aJdbcValuesMappingProducer
so it can be cached by thedelegates
when they are instantiated.- Parameters:
persister
- the current entity persistertiming
- the timing of the mutation operationsupportsArbitraryValues
- if we should process arbitrary (non-identifier) generated valuessupportsRowId
- if we should processrowid
sfalse
if we should retrieve the index through the column expression- Returns:
- the instantiated jdbc values mapping producer
-
getActualGeneratedModelPart
-
getGeneratedValuesDelegate
public static GeneratedValuesMutationDelegate getGeneratedValuesDelegate(EntityPersister persister, EventType timing) Creates thedelegate
used to retrieve database generated values on mutation execution through e.g.insert ... returning
syntax or the JDBCgetGeneratedKeys()
API.If the current
Dialect
doesn't support any of the available delegates this method returnsnull
. -
noCustomSql