@Override
public void setExpectedType(Type expectedType) {
if ( this.expectedType != null ) {
return;
}
if ( AttributeConverterTypeAdapter.class.isInstance( expectedType ) ) {
final AttributeConverterTypeAdapter adapterType = (AttributeConverterTypeAdapter) expectedType;
if ( getDataType().getReturnedClass().equals( adapterType.getModelType() ) ) {
// apply the converter
final AttributeConverter converter = ( (AttributeConverterTypeAdapter) expectedType ).getAttributeConverter();
final Object converted = converter.convertToDatabaseColumn( getLiteralValue() );
if ( isCharacterData( adapterType.sqlType() ) ) {
setText( "'" + converted.toString() + "'" );
}
else {
setText( converted.toString() );
}
}
this.expectedType = expectedType;
}
}
LiteralNode.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录