@Test public void testConvertToBigDecimal() throws TranslatorException { Assert.assertFalse( TRANSLATOR.supportsConvert(TypeFacility.RUNTIME_CODES.STRING, TypeFacility.RUNTIME_CODES.BIG_DECIMAL)); Assert.assertFalse( TRANSLATOR.supportsConvert(TypeFacility.RUNTIME_CODES.STRING, TypeFacility.RUNTIME_CODES.BIG_INTEGER)); Assert.assertFalse( TRANSLATOR.supportsConvert(TypeFacility.RUNTIME_CODES.STRING, TypeFacility.RUNTIME_CODES.GEOMETRY)); Assert.assertTrue( TRANSLATOR.supportsConvert(TypeFacility.RUNTIME_CODES.STRING, TypeFacility.RUNTIME_CODES.INTEGER)); }
@Override public boolean supportsConvert(int fromType, int toType) { if (fromType != TypeFacility.RUNTIME_CODES.OBJECT && !super.supportsConvert(fromType, toType)) { return false; } if (convert.hasTypeMapping(toType)) { return true; } return false; }
PIExecutionFactory extends JDBCExecutionFactory { @Override public boolean supportsConvert(int fromType, int toType) { if (fromType != TypeFacility.RUNTIME_CODES.OBJECT && !super.supportsConvert(fromType, toType)) { return false; } if (convert.hasTypeMapping(toType)) { return true; } return false; } }
PIExecutionFactory extends JDBCExecutionFactory { @Override public boolean supportsConvert(int fromType, int toType) { if (fromType != TypeFacility.RUNTIME_CODES.OBJECT && !super.supportsConvert(fromType, toType)) { return false; } if (convert.hasTypeMapping(toType)) { return true; } return false; } PIExecutionFactory(); }
PIExecutionFactory extends JDBCExecutionFactory { @Override public boolean supportsConvert(int fromType, int toType) { if (fromType != TypeFacility.RUNTIME_CODES.OBJECT && !super.supportsConvert(fromType, toType)) { return false; } if (convert.hasTypeMapping(toType)) { return true; } return false; } PIExecutionFactory(); @Override void start(); @Override boolean supportsSelectWithoutFrom(); @Override boolean supportsInlineViews(); @Override boolean supportsRowLimit(); @Override boolean supportsFunctionsInGroupBy(); @Override boolean supportsInsertWithQueryExpression(); @Override boolean supportsBatchedUpdates(); @Override boolean supportsBulkUpdate(); @Override List<?> translateLimit(Limit limit, ExecutionContext context); @Override boolean useSelectLimit(); @Override List<String> getSupportedFunctions(); @Override String translateLiteralDate(Date dateValue); @Override String translateLiteralTime(Time timeValue); @Override String translateLiteralTimestamp(Timestamp timestampValue); @Override void getMetadata(MetadataFactory metadataFactory, Connection conn); @Override MetadataProcessor<Connection> getMetadataProcessor(); boolean useAsInGroupAlias(); @Override List<?> translate(LanguageObject obj, ExecutionContext context); @Override SQLConversionVisitor getSQLConversionVisitor(); boolean supportsLateralJoin(); boolean supportsLateralJoinCondition(); @Override boolean supportsOnlyLateralJoinProcedure(); boolean supportsProcedureTable(); @Override Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType); @Override Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType); @Override boolean supportsConvert(int fromType, int toType); }
PIExecutionFactory extends JDBCExecutionFactory { @Override public boolean supportsConvert(int fromType, int toType) { if (fromType != TypeFacility.RUNTIME_CODES.OBJECT && !super.supportsConvert(fromType, toType)) { return false; } if (convert.hasTypeMapping(toType)) { return true; } return false; } PIExecutionFactory(); @Override void start(); @Override boolean supportsSelectWithoutFrom(); @Override boolean supportsInlineViews(); @Override boolean supportsRowLimit(); @Override boolean supportsFunctionsInGroupBy(); @Override boolean supportsInsertWithQueryExpression(); @Override boolean supportsBatchedUpdates(); @Override boolean supportsBulkUpdate(); @Override List<?> translateLimit(Limit limit, ExecutionContext context); @Override boolean useSelectLimit(); @Override List<String> getSupportedFunctions(); @Override String translateLiteralDate(Date dateValue); @Override String translateLiteralTime(Time timeValue); @Override String translateLiteralTimestamp(Timestamp timestampValue); @Override void getMetadata(MetadataFactory metadataFactory, Connection conn); @Override MetadataProcessor<Connection> getMetadataProcessor(); boolean useAsInGroupAlias(); @Override List<?> translate(LanguageObject obj, ExecutionContext context); @Override SQLConversionVisitor getSQLConversionVisitor(); boolean supportsLateralJoin(); boolean supportsLateralJoinCondition(); @Override boolean supportsOnlyLateralJoinProcedure(); boolean supportsProcedureTable(); @Override Object retrieveValue(ResultSet results, int columnIndex, Class<?> expectedType); @Override Object retrieveValue(CallableStatement results, int parameterIndex, Class<?> expectedType); @Override boolean supportsConvert(int fromType, int toType); static String PI; }