1 package com.quadcap.sql.types; 2 3 40 41 import java.io.Externalizable ; 42 import java.io.IOException ; 43 import java.io.ObjectInput ; 44 import java.io.ObjectOutput ; 45 46 import java.sql.ResultSet ; 47 import java.sql.SQLException ; 48 import java.sql.Types ; 49 50 import com.quadcap.util.Debug; 51 52 57 public class TypeDate implements Type, Externalizable { 58 public static final TypeDate typeDate = new TypeDate(); 59 60 public TypeDate() {} 61 62 public String getTypeName() { 63 return "DATE"; 64 } 65 66 public int getJDBCType() { return Types.DATE; } 67 68 public String getJDBCClassName() { return "java.sql.Date"; } 69 70 public int getPrecision() { return 0; } 71 72 public int getScale() { return 0; } 73 74 public int getMaxPrecision() { return 32; } 75 76 public int getMinScale() { return -1; } 77 78 public int getMaxScale() { return -1; } 79 80 public boolean isCharType() { return false; } 81 82 public boolean isCaseSensitive() { return false; } 83 84 public boolean isCurrency() { return false; } 85 86 public boolean isSigned() { return false; } 87 88 public String toString() { 89 return "DATE"; 90 } 91 92 public int getDisplayWidth() { return 10; } 93 94 public void readExternal(ObjectInput in) { 95 } 96 97 public void writeExternal(ObjectOutput out) { 98 } 99 100 public Value convert(Value v) throws ValueException { 101 return v.convert(this); 102 } 103 104 public String getCreateParams() { 105 return null; 106 } 107 } 108 | Popular Tags |