1 24 25 package com.mckoi.database; 26 27 import java.util.Date ; 28 29 34 35 public class TDateType extends TType { 36 37 static final long serialVersionUID = 1494137367081481985L; 38 39 42 public TDateType(int sql_type) { 43 super(sql_type); 44 } 45 46 public boolean comparableTypes(TType type) { 47 return (type instanceof TDateType); 48 } 49 50 public int compareObs(Object ob1, Object ob2) { 51 return ((Date ) ob1).compareTo((Date ) ob2); 52 } 53 54 public int calculateApproximateMemoryUse(Object ob) { 55 return 4 + 8; 56 } 57 58 public Class javaClass() { 59 return Date .class; 60 } 61 62 } 63 | Popular Tags |