public static NativeSQLQueryScalarReturn extractReturnDescription( JaxbHbmNativeQueryScalarReturnType rtnSource, HbmLocalMetadataBuildingContext context) { final String column = rtnSource.getColumn(); final String typeName = rtnSource.getType(); Type type = null; if ( typeName != null ) { type = context.getMetadataCollector().getTypeResolver().heuristicType( typeName ); if ( type == null ) { throw new MappingException( String.format( "Unable to resolve type [%s] specified for native query scalar return", typeName ), context.getOrigin() ); } } return new NativeSQLQueryScalarReturn( column, type ); }
private static void bindFilterDef(FilterDef defAnn, MetadataBuildingContext context) { Map<String, org.hibernate.type.Type> params = new HashMap<>(); for ( ParamDef param : defAnn.parameters() ) { params.put( param.name(), context.getMetadataCollector().getTypeResolver().heuristicType( param.type() ) ); } FilterDefinition def = new FilterDefinition( defAnn.name(), defAnn.defaultCondition(), params ); LOG.debugf( "Binding filter definition: %s", def.getFilterName() ); context.getMetadataCollector().addFilterDefinition( def ); }
context.getMetadataCollector().getTypeResolver().heuristicType( jaxbParameterMapping.getParameterValueTypeName() ) );
new NativeSQLQueryScalarReturn( normalizeColumnQuoting( column.name() ), column.type() != null ? context.getMetadataCollector().getTypeResolver().heuristicType( column.type().getName() ) : null new NativeSQLQueryScalarReturn( normalizeColumnQuoting( columnResult.name() ), columnResult.type() != null ? context.getMetadataCollector().getTypeResolver().heuristicType( columnResult.type().getName() ) : null
try { final DiscriminatorType metaType = (DiscriminatorType) sourceDocument.getMetadataCollector() .getTypeResolver() .heuristicType( discriminatorTypeResolution.typeName );
private void resolveLob(final SingularAttributeSourceBasic attributeSource, SimpleValue value) { // Resolves whether the property is LOB based on the type attribute on the attribute property source. // Essentially this expects the type to map to a CLOB/NCLOB/BLOB sql type internally and compares. if ( !value.isLob() && value.getTypeName() != null ) { final TypeResolver typeResolver = attributeSource.getBuildingContext().getMetadataCollector().getTypeResolver(); final BasicType basicType = typeResolver.basic( value.getTypeName() ); if ( basicType instanceof AbstractSingleColumnStandardBasicType ) { if ( isLob( ( (AbstractSingleColumnStandardBasicType) basicType ).getSqlTypeDescriptor().getSqlType(), null ) ) { value.makeLob(); } } } // If the prior check didn't set the lob flag, this will inspect the column sql-type attribute value and // if this maps to CLOB/NCLOB/BLOB then the value will be marked as lob. if ( !value.isLob() ) { for ( RelationalValueSource relationalValueSource : attributeSource.getRelationalValueSources() ) { if ( ColumnSource.class.isInstance( relationalValueSource ) ) { if ( isLob( null, ( (ColumnSource) relationalValueSource ).getSqlType() ) ) { value.makeLob(); } } } } }
org.hibernate.type.Type metaType = context.getMetadataCollector().getTypeResolver().heuristicType( value.getMetaType() ); for (MetaValue metaValue : metaAnnDef.metaValues()) { try {
); Type wantedType = metadataCollector.getTypeResolver().heuristicType(preferredHibernateType);
); Type wantedType = metadataCollector.getTypeResolver().heuristicType(preferredHibernateType);