1 22 23 package org.xquark.extractor.sql; 24 25 import org.xquark.jdbc.typing.DbType; 26 27 abstract public class SqlConvert extends SqlExpression { 28 29 private static final String RCSRevision = "$Revision: 1.5 $"; 30 private static final String RCSName = "$Name: $"; 31 32 33 protected SqlExpression _expression; 34 protected DbType _originalType; 35 protected DbType _targetType; 36 37 public SqlConvert() { 38 } 39 40 public SqlConvert(SqlExpression expr, DbType originalType, DbType targetType) { 41 setExpression(expr); 42 setOriginalType(originalType); 43 setTargetType(targetType); 44 } 45 46 public DbType getOriginalType() { 47 return _originalType; 48 } 49 50 public void setOriginalType(DbType originalType) { 51 _originalType = originalType; 52 } 53 54 public DbType getTargetType() { 55 return _targetType; 56 } 57 58 public void setTargetType(DbType targetType) { 59 _targetType = targetType; 60 } 61 62 public SqlExpression getExpression() { 63 return _expression; 64 } 65 66 public void setExpression(SqlExpression expression) { 67 _expression = expression; 68 } 69 70 abstract public String toSql (Context context); 71 } 72 | Popular Tags |