@Override @SuppressWarnings( {"unchecked"}) public String getRenderText(SessionFactoryImplementor sessionFactory) { final boolean literalValue = getValue(); if ( expectedType instanceof AttributeConverterTypeAdapter ) { return determineConvertedValue( (AttributeConverterTypeAdapter) expectedType, literalValue ); } else if ( expectedType instanceof LiteralType ) { try { return ( (LiteralType) expectedType ).objectToSQLString( getValue(), sessionFactory.getDialect() ); } catch( Exception t ) { throw new QueryException( "Unable to render boolean literal value using expected LiteralType", t ); } } return sessionFactory.getDialect().toBooleanValueString( literalValue ); } }
public Boolean getValue() { return getType() == TRUE ; }
public Type getDataType() { return getExpectedType() == null ? StandardBasicTypes.BOOLEAN : getExpectedType(); }
@Override @SuppressWarnings( {"unchecked"}) public String getRenderText(SessionFactoryImplementor sessionFactory) { try { return typeAsLiteralType().objectToSQLString( getValue(), sessionFactory.getDialect() ); } catch( Throwable t ) { throw new QueryException( "Unable to render boolean literal value", t ); } }
return Stmt.loadLiteral(((BooleanLiteralNode) ast).getValue());
private LiteralType typeAsLiteralType() { return (LiteralType) getDataType(); } }
@Override @SuppressWarnings( {"unchecked"}) public String getRenderText(SessionFactoryImplementor sessionFactory) { try { return typeAsLiteralType().objectToSQLString( getValue(), sessionFactory.getDialect() ); } catch( Throwable t ) { throw new QueryException( "Unable to render boolean literal value", t ); } }
private LiteralType typeAsLiteralType() { return (LiteralType) getDataType(); } }
public Boolean getValue() { return getType() == TRUE ; }
public Boolean getValue() { return getType() == TRUE ; }