private void processGeneratedProperties ( Serializable id , Object entity , Object [ ] state , SharedSessionContractImplementor session , GenerationTiming matchTiming ) { Tuple tuple = getFreshTuple ( EntityKeyBuilder . fromPersister ( this , id , session ) , session ) ; saveSharedTuple ( entity , tuple , session ) ; if ( tuple == null || tuple . getSnapshot ( ) . isEmpty ( ) ) { throw log . couldNotRetrieveEntityForRetrievalOfGeneratedProperties ( getEntityName ( ) , id ) ; } int propertyIndex = - 1 ; for ( NonIdentifierAttribute attribute : getEntityMetamodel ( ) . getProperties ( ) ) { propertyIndex ++ ; final ValueGeneration valueGeneration = attribute . getValueGenerationStrategy ( ) ; if ( isReadRequired ( valueGeneration , matchTiming ) ) { Object hydratedState = gridPropertyTypes [ propertyIndex ] . hydrate ( tuple , getPropertyAliases ( "" , propertyIndex ) , session , entity ) ; state [ propertyIndex ] = gridPropertyTypes [ propertyIndex ] . resolve ( hydratedState , session , entity ) ; setPropertyValue ( entity , propertyIndex , state [ propertyIndex ] ) ; } } }
Re - reads the given entity refreshing any properties updated on the server - side during insert or update .