@Test public void rdbmsNullObjectTest() { final DataRdbms data = instance.getData(null); Assert.assertEquals(data.getValue(), "NULL"); Assert.assertEquals(data.getParameter(), "NULL"); }
public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "', 'mm/dd/yyyy hh24:mi:ss.ff3')"); } if (object instanceof Date) { final DateFormat df = new SimpleDateFormat(DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:mi:ss')"); } return genericRdbms.getData(object); }
OracleRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "', 'mm/dd/yyyy hh24:mi:ss.ff3')"); } if (object instanceof Date) { final DateFormat df = new SimpleDateFormat(DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:mi:ss')"); } return genericRdbms.getData(object); } }
OracleRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "', 'mm/dd/yyyy hh24:mi:ss.ff3')"); } if (object instanceof Date) { final DateFormat df = new SimpleDateFormat(DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:mi:ss')"); } return genericRdbms.getData(object); }  }
OracleRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "', 'mm/dd/yyyy hh24:mi:ss.ff3')"); } if (object instanceof Date) { final DateFormat df = new SimpleDateFormat(DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:mi:ss')"); } 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(String sql); boolean isCaseSensitive(); }
OracleRdbmsSpecifics implements RdbmsSpecifics { public DataRdbms getData(final Object object) { if (object instanceof Timestamp) { final DateFormat df = new SimpleDateFormat(TIMESTAMP_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_timestamp('", dateString, "', 'mm/dd/yyyy hh24:mi:ss.ff3')"); } if (object instanceof Date) { final DateFormat df = new SimpleDateFormat(DATE_PATTERN); final String dateString = df.format(object); return new GenericDataRdbms("to_date('", dateString, "', 'mm/dd/yyyy hh24:mi:ss')"); } 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(String sql); boolean isCaseSensitive();  }