From b8b45ceae739882838ada78af361fec96e8f1b72 Mon Sep 17 00:00:00 2001 From: Sita Date: Sun, 21 Jul 2024 15:44:20 +0200 Subject: [PATCH] #47: Remove dead code --- .../jooq/binding/JooqPropertyBindings.java | 40 -------------- .../impl/jooq/binding/LogicalPath.java | 54 ------------------- 2 files changed, 94 deletions(-) delete mode 100644 core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/JooqPropertyBindings.java delete mode 100644 core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/LogicalPath.java diff --git a/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/JooqPropertyBindings.java b/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/JooqPropertyBindings.java deleted file mode 100644 index 038b9be..0000000 --- a/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/JooqPropertyBindings.java +++ /dev/null @@ -1,40 +0,0 @@ -package place.sita.labelle.datasource.impl.jooq.binding; - -import org.jooq.Condition; -import org.jooq.Field; -import org.jooq.Table; - -import java.util.HashMap; -import java.util.Map; - -public class JooqPropertyBindings { - - private final Map bindings = new HashMap<>(); - private final Map tables = new HashMap<>(); - private final Map tablesJoin = new HashMap<>(); - - public void addBinding(LogicalPath path, Field binding) { - bindings.put(path, binding); - } - - public Field getBinding(LogicalPath path) { - return bindings.get(path); - } - - public void addTable(LogicalPath path, Table table) { - tables.put(path, table); - } - - public Table getTable(LogicalPath path) { - return tables.get(path); - } - - public void addTableJoin(LogicalPath path, Condition join) { - tablesJoin.put(path, join); - } - - public Condition getTableJoin(LogicalPath path) { - return tablesJoin.get(path); - } - -} diff --git a/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/LogicalPath.java b/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/LogicalPath.java deleted file mode 100644 index 88a689c..0000000 --- a/core-common/src/main/java/place/sita/labelle/datasource/impl/jooq/binding/LogicalPath.java +++ /dev/null @@ -1,54 +0,0 @@ -package place.sita.labelle.datasource.impl.jooq.binding; - -import com.google.common.collect.Lists; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -public class LogicalPath { - - private final List path = new ArrayList<>(); - - public static LogicalPath path(String path) { - LogicalPath lp = new LogicalPath(); - lp.path.add(path); - return lp; - } - - public static LogicalPath path(String path, String... paths) { - LogicalPath lp = new LogicalPath(); - lp.path.add(path); - Collections.addAll(lp.path, paths); - return lp; - } - - public static LogicalPath path(List path, String pathElement) { - LogicalPath lp = new LogicalPath(); - lp.path.addAll(path); - lp.path.add(pathElement); - return lp; - } - - public List getPath() { - return Lists.newArrayList(path); - } - - @Override - public String toString() { - return String.join(".", path); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof LogicalPath) { - return path.equals(((LogicalPath) obj).path); - } - return false; - } - - @Override - public int hashCode() { - return path.hashCode(); - } -}