diff --git a/src/main/java/org/redkale/source/DataMemorySource.java b/src/main/java/org/redkale/source/DataMemorySource.java index ce4cf4f03..d370ea88c 100644 --- a/src/main/java/org/redkale/source/DataMemorySource.java +++ b/src/main/java/org/redkale/source/DataMemorySource.java @@ -59,11 +59,6 @@ public class DataMemorySource extends AbstractDataSqlSource implements SearchSou return config.getValue(DATA_SOURCE_URL).startsWith("memory:search"); } - @Override - public String toString() { - return getClass().getSimpleName() + "{type=memory, name='" + resourceName() + "'}"; - } - @Local @Override public void compile(Class clazz) { @@ -74,191 +69,123 @@ public class DataMemorySource extends AbstractDataSqlSource implements SearchSou } @Override - public int updateMapping(final Class clazz, String table) { - return 0; - } - - @Override - public CompletableFuture updateMappingAsync(final Class clazz, String table) { - return CompletableFuture.completedFuture(0); - } - - @Override - protected boolean isOnlyCache(EntityInfo info) { + protected final boolean isOnlyCache(EntityInfo info) { return true; } - @Local + @Override + protected final boolean isAsync() { + return false; + } + + @Override + public String toString() { + return getClass().getSimpleName() + "{type=memory, name='" + resourceName() + "'}"; + } + @Override public int directExecute(String sql) { throw new UnsupportedOperationException("Not supported yet."); } - @Local @Override public int[] directExecute(String... sqls) { throw new UnsupportedOperationException("Not supported yet."); } - @Local @Override public V directQuery(String sql, Function handler) { throw new UnsupportedOperationException("Not supported yet."); } - @Override - protected boolean isAsync() { - return false; - } - @Override protected String prepareParamSign(int index) { throw new UnsupportedOperationException("Not supported yet."); } - @Override - protected int insertDB(EntityInfo info, T... entitys) { - return 0; - } - - @Override - protected int deleteDB(EntityInfo info, String[] tables, Flipper flipper, FilterNode node, Map> pkmap, String... sqls) { - return 0; - } - - @Override - protected int clearTableDB(EntityInfo info, String[] tables, FilterNode node, String... sqls) { - return 0; - } - - @Override - protected int dropTableDB(EntityInfo info, String[] tables, FilterNode node, String... sqls) { - return 0; - } - - @Override - protected int updateEntityDB(EntityInfo info, T... entitys) { - return 0; - } - - @Override - protected int updateColumnDB(EntityInfo info, Flipper flipper, UpdateSqlInfo sql) { - return 0; - } - - @Override - protected Map getNumberMapDB(EntityInfo info, String[] tables, String sql, FilterNode node, FilterFuncColumn... columns) { - return null; - } - - @Override - protected Number getNumberResultDB(EntityInfo info, String[] tables, String sql, FilterFunc func, Number defVal, String column, final FilterNode node) { - return defVal; - } - - @Override - protected Map queryColumnMapDB(EntityInfo info, String[] tables, String sql, String keyColumn, FilterFunc func, String funcColumn, FilterNode node) { - return null; - } - - @Override - protected Map queryColumnMapDB(final EntityInfo info, String[] tables, final String sql, final ColumnNode[] funcNodes, final String[] groupByColumns, FilterNode node) { - return null; - } - - @Override - protected T findDB(EntityInfo info, String[] tables, String sql, boolean onlypk, SelectColumn selects, Serializable pk, FilterNode node) { - return null; - } - - @Override - protected Serializable findColumnDB(EntityInfo info, final String[] tables, String sql, boolean onlypk, String column, Serializable defValue, Serializable pk, FilterNode node) { - return null; - } - - @Override - protected boolean existsDB(EntityInfo info, final String[] tables, String sql, boolean onlypk, Serializable pk, FilterNode node) { - return false; - } - - @Override - protected Sheet querySheetDB(EntityInfo info, final boolean readCache, boolean needTotal, final boolean distinct, SelectColumn selects, Flipper flipper, FilterNode node) { - return new Sheet<>(0, new ArrayList()); - } - @Override protected CompletableFuture insertDBAsync(EntityInfo info, T... entitys) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture deleteDBAsync(EntityInfo info, String[] tables, Flipper flipper, FilterNode node, Map> pkmap, String... sqls) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture clearTableDBAsync(EntityInfo info, String[] tables, FilterNode node, String... sqls) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture createTableDBAsync(EntityInfo info, String copyTableSql, Serializable pk, String... sqls) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture dropTableDBAsync(EntityInfo info, String[] tables, FilterNode node, String... sqls) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture updateEntityDBAsync(EntityInfo info, T... entitys) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture updateColumnDBAsync(EntityInfo info, Flipper flipper, UpdateSqlInfo sql) { - return CompletableFuture.completedFuture(0); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture> getNumberMapDBAsync(EntityInfo info, String[] tables, String sql, FilterNode node, FilterFuncColumn... columns) { - return CompletableFuture.completedFuture(null); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture getNumberResultDBAsync(EntityInfo info, String[] tables, String sql, FilterFunc func, Number defVal, String column, FilterNode node) { - return CompletableFuture.completedFuture(defVal); + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture> queryColumnMapDBAsync(EntityInfo info, String[] tables, String sql, String keyColumn, FilterFunc func, String funcColumn, FilterNode node) { - return CompletableFuture.completedFuture(null); + throw new UnsupportedOperationException("Not supported yet."); } @Override - protected CompletableFuture> queryColumnMapDBAsync(final EntityInfo info, String[] tables, final String sql, final ColumnNode[] funcNodes, final String[] groupByColumns, FilterNode node) { - return CompletableFuture.completedFuture(null); + protected CompletableFuture> queryColumnMapDBAsync(EntityInfo info, String[] tables, String sql, ColumnNode[] funcNodes, String[] groupByColumns, FilterNode node) { + throw new UnsupportedOperationException("Not supported yet."); } @Override protected CompletableFuture findDBAsync(EntityInfo info, String[] tables, String sql, boolean onlypk, SelectColumn selects, Serializable pk, FilterNode node) { - return CompletableFuture.completedFuture(null); + throw new UnsupportedOperationException("Not supported yet."); } @Override - protected CompletableFuture findColumnDBAsync(EntityInfo info, final String[] tables, String sql, boolean onlypk, String column, Serializable defValue, Serializable pk, FilterNode node) { - return CompletableFuture.completedFuture(null); + protected CompletableFuture findColumnDBAsync(EntityInfo info, String[] tables, String sql, boolean onlypk, String column, Serializable defValue, Serializable pk, FilterNode node) { + throw new UnsupportedOperationException("Not supported yet."); } @Override - protected CompletableFuture existsDBAsync(EntityInfo info, final String[] tables, String sql, boolean onlypk, Serializable pk, FilterNode node) { - return CompletableFuture.completedFuture(false); + protected CompletableFuture existsDBAsync(EntityInfo info, String[] tables, String sql, boolean onlypk, Serializable pk, FilterNode node) { + throw new UnsupportedOperationException("Not supported yet."); } @Override - protected CompletableFuture> querySheetDBAsync(EntityInfo info, final boolean readCache, boolean needTotal, final boolean distinct, SelectColumn selects, Flipper flipper, FilterNode node) { - return CompletableFuture.completedFuture(new Sheet<>(0, new ArrayList())); + protected CompletableFuture> querySheetDBAsync(EntityInfo info, boolean readcache, boolean needtotal, boolean distinct, SelectColumn selects, Flipper flipper, FilterNode node) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public int updateMapping(Class clazz, String table) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public CompletableFuture updateMappingAsync(Class clazz, String table) { + throw new UnsupportedOperationException("Not supported yet."); } }