1 28 29 package com.caucho.db.sql; 30 31 import com.caucho.log.Log; 32 33 import java.sql.SQLException ; 34 import java.util.ArrayList ; 35 import java.util.logging.Logger ; 36 37 class StringExpr extends Expr { 38 private static final Logger log = Log.open(StringExpr.class); 39 40 private String _value; 41 42 StringExpr(String value) 43 { 44 _value = value; 45 } 46 47 50 public String getValue() 51 { 52 return _value; 53 } 54 55 58 public Class getType() 59 { 60 return String .class; 61 } 62 63 66 public long subCost(ArrayList <FromItem> fromList) 67 { 68 return 0; 69 } 70 71 74 public boolean isNull(QueryContext context) 75 throws SQLException 76 { 77 return _value == null; 78 } 79 80 83 public String evalString(QueryContext context) 84 throws SQLException 85 { 86 return _value; 87 } 88 89 public String toString() 90 { 91 return "'" + _value + "'"; 92 } 93 } 94 | Popular Tags |