simpleValue.setTypeUsingReflection( persistentClassName, propertyName );
@Test public void testBasicOperation() { SimpleValue simpleValue = new SimpleValue( new MetadataBuildingContextTestingImpl() ); simpleValue.setJpaAttributeConverterDescriptor( new InstanceBasedConverterDescriptor( new StringClobConverter(), new ClassmateContext() ) ); simpleValue.setTypeUsingReflection( IrrelevantEntity.class.getName(), "name" ); Type type = simpleValue.getType(); assertNotNull( type ); if ( !AttributeConverterTypeAdapter.class.isInstance( type ) ) { fail( "AttributeConverter not applied" ); } AbstractStandardBasicType basicType = assertTyping( AbstractStandardBasicType.class, type ); assertSame( StringTypeDescriptor.INSTANCE, basicType.getJavaTypeDescriptor() ); assertEquals( Types.CLOB, basicType.getSqlTypeDescriptor().getSqlType() ); }
idValue.setTypeUsingReflection( rootEntityDescriptor.getClassName(), propertyName );
public void fillSimpleValue() { log.debug( "setting SimpleValue typeName for {}", propertyName ); String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion()) { simpleValue.setTypeName( "integer" ); } }
public SimpleValue fillSimpleValue(SimpleValue simpleValue) { String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } for ( Ejb3Column column : columns ) { column.linkWithValue( simpleValue ); } return simpleValue; } }
public void fillSimpleValue() { LOG.debugf( "Setting SimpleValue typeName for %s", propertyName ); String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion() ) { simpleValue.setTypeName( "integer" ); } // HHH-5205 if ( timeStampVersionType != null ) { simpleValue.setTypeName( timeStampVersionType ); } }
public void fillSimpleValue() { LOG.debugf( "Setting SimpleValue typeName for %s", propertyName ); String type = BinderHelper.isEmptyAnnotationValue( explicitType ) ? returnedClassName : explicitType; org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type ); if ( typeDef != null ) { type = typeDef.getTypeClass(); simpleValue.setTypeParameters( typeDef.getParameters() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { //explicit type params takes precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); if ( persistentClassName != null ) { simpleValue.setTypeUsingReflection( persistentClassName, propertyName ); } if ( !simpleValue.isTypeSpecified() && isVersion() ) { simpleValue.setTypeName( "integer" ); } // HHH-5205 if ( timeStampVersionType != null ) { simpleValue.setTypeName( timeStampVersionType ); } }
id.setTypeUsingReflection( entity.getClassName(), propertyName );
id.setTypeUsingReflection( entity.getClassName(), propertyName );
id.setTypeUsingReflection( entity.getClassName(), propertyName );
id.setTypeUsingReflection( entity.getClassName(), propertyName );