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 aJdbcValuesMappingProducerso it can be cached by thedelegateswhen they are instantiated.static BasicValuedModelPartgetActualGeneratedModelPart(BasicValuedModelPart modelPart) static GeneratedValuesgetGeneratedValues(ResultSet resultSet, PreparedStatement statement, EntityPersister persister, EventType timing, SharedSessionContractImplementor session) Reads the generated values for the specifiedResultSet.getGeneratedValuesDelegate(EntityPersister persister, EventType timing) Creates thedelegateused to retrieve database generated values on mutation execution through e.g.static booleannoCustomSql(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 aJdbcValuesMappingProducerso it can be cached by thedelegateswhen 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 processrowidsfalseif 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 thedelegateused to retrieve database generated values on mutation execution through e.g.insert ... returningsyntax or the JDBCgetGeneratedKeys()API.If the current
Dialectdoesn't support any of the available delegates this method returnsnull. -
noCustomSql