@Test public void rdbmsBooleanTest() { final Boolean trueValue = new Boolean(true); DataRdbms data = instance.getData(trueValue); Assert.assertEquals(data.getValue(), "1"); Assert.assertEquals(data.getParameter(), "'1'"); final Boolean falseValue = new Boolean(false); data = instance.getData(falseValue); Assert.assertEquals(data.getValue(), "0"); Assert.assertEquals(data.getParameter(), "'0'"); }
public DataRdbms getData(final Object object) { if (object instanceof java.sql.Time) { final DateFormat df = new SimpleDateFormat(TIME_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.sql.Date) { final DateFormat df = new SimpleDateFormat(SQL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.util.Date) { final DateFormat df = new SimpleDateFormat(UTIL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } return genericRdbms.getData(object); }
MySqlRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof java.sql.Time) { final DateFormat df = new SimpleDateFormat(TIME_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.sql.Date) { final DateFormat df = new SimpleDateFormat(SQL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.util.Date) { final DateFormat df = new SimpleDateFormat(UTIL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } return genericRdbms.getData(object); } }
MySqlRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof java.sql.Time) { final DateFormat df = new SimpleDateFormat(TIME_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.sql.Date) { final DateFormat df = new SimpleDateFormat(SQL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.util.Date) { final DateFormat df = new SimpleDateFormat(UTIL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } return genericRdbms.getData(object); }  }
MySqlRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof java.sql.Time) { final DateFormat df = new SimpleDateFormat(TIME_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.sql.Date) { final DateFormat df = new SimpleDateFormat(SQL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.util.Date) { final DateFormat df = new SimpleDateFormat(UTIL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } return genericRdbms.getData(object); }  boolean isRdbms(final String classType); DataRdbms getData(final Object object); String getTypeQuery(final String sql); int beginQuery(String sql, int index); String removeComment(final String sql); boolean isCaseSensitive(); }
MySqlRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof java.sql.Time) { final DateFormat df = new SimpleDateFormat(TIME_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.sql.Date) { final DateFormat df = new SimpleDateFormat(SQL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } if (object instanceof java.util.Date) { final DateFormat df = new SimpleDateFormat(UTIL_DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms(dateString, "'"); } return genericRdbms.getData(object); }  boolean isRdbms(final String classType); DataRdbms getData(final Object object); String getTypeQuery(final String sql); int beginQuery(String sql, int index); String removeComment(final String sql); boolean isCaseSensitive();  }