@Test public void buildDeleteStatement() { SystemCodes sc = new SystemCodes("category1","key1","value1"); sc.setId(1l); Assert.assertEquals("delete from system_codes where id=1", SyncUtil.buildDeleteStatement(sc)); }
public static String buildDeleteStatement(BaseEntity obj) { String tableName = SyncUtil.getTableName(obj); StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName).append(" where id=?"); return sql.toString(); }
SyncUtil { public static String buildDeleteStatement(BaseEntity obj) { String tableName = SyncUtil.getTableName(obj); StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName).append(" where id=?"); return sql.toString(); } }
SyncUtil { public static String buildDeleteStatement(BaseEntity obj) { String tableName = SyncUtil.getTableName(obj); StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName).append(" where id=?"); return sql.toString(); }  }
SyncUtil { public static String buildDeleteStatement(BaseEntity obj) { String tableName = SyncUtil.getTableName(obj); StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName).append(" where id=?"); return sql.toString(); }  static String[] buildInsertStatement(BaseEntity obj); static String[] buildInsertStatement(BaseEntity obj, Class<?> clazz); static String[] buildUpdateStatement(BaseEntity obj, List<String> fields); static String buildDeleteStatement(BaseEntity obj); static String getTableName(BaseEntity obj); void setSyncNormalizerList(List<Normalizer> normalizer); }
SyncUtil { public static String buildDeleteStatement(BaseEntity obj) { String tableName = SyncUtil.getTableName(obj); StringBuilder sql = new StringBuilder("delete from "); sql.append(tableName).append(" where id=?"); return sql.toString(); }  static String[] buildInsertStatement(BaseEntity obj); static String[] buildInsertStatement(BaseEntity obj, Class<?> clazz); static String[] buildUpdateStatement(BaseEntity obj, List<String> fields); static String buildDeleteStatement(BaseEntity obj); static String getTableName(BaseEntity obj); void setSyncNormalizerList(List<Normalizer> normalizer);  }