@Test public void Dateの値をリテラルに変換する() throws Exception { Calendar cal = Calendar.getInstance(); cal.set(2011, 10, 1); assertThat(target.convert(new Date(cal.getTimeInMillis())), is("'2011-11-01'")); ; }
@Override public String convert(Date target) { checkNotNull(target); StringBuilder sb = new StringBuilder(); sb.append(QUOTE_STRING); sb.append(target.toString()); sb.append(QUOTE_STRING); return sb.toString(); }
SqlDateLiteralConvertor implements LiteralConvertor<Date> { @Override public String convert(Date target) { checkNotNull(target); StringBuilder sb = new StringBuilder(); sb.append(QUOTE_STRING); sb.append(target.toString()); sb.append(QUOTE_STRING); return sb.toString(); } }
SqlDateLiteralConvertor implements LiteralConvertor<Date> { @Override public String convert(Date target) { checkNotNull(target); StringBuilder sb = new StringBuilder(); sb.append(QUOTE_STRING); sb.append(target.toString()); sb.append(QUOTE_STRING); return sb.toString(); } SqlDateLiteralConvertor(); }
SqlDateLiteralConvertor implements LiteralConvertor<Date> { @Override public String convert(Date target) { checkNotNull(target); StringBuilder sb = new StringBuilder(); sb.append(QUOTE_STRING); sb.append(target.toString()); sb.append(QUOTE_STRING); return sb.toString(); } SqlDateLiteralConvertor(); @Override String convert(Date target); @Override Class<?> getJavaType(); }
SqlDateLiteralConvertor implements LiteralConvertor<Date> { @Override public String convert(Date target) { checkNotNull(target); StringBuilder sb = new StringBuilder(); sb.append(QUOTE_STRING); sb.append(target.toString()); sb.append(QUOTE_STRING); return sb.toString(); } SqlDateLiteralConvertor(); @Override String convert(Date target); @Override Class<?> getJavaType();  }