diff options
-rw-r--r-- | src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java | 1 | ||||
-rw-r--r-- | src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java | 16 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java index c9eaa99..270d638 100644 --- a/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java +++ b/src/main/java/org/onap/dcae/inventory/daos/DCAEServicesComponentsMapsDAO.java @@ -34,6 +34,7 @@ import org.skife.jdbi.v2.sqlobject.SqlUpdate; public interface DCAEServicesComponentsMapsDAO extends InventoryDAO { @SqlQuery("select exists (select * from information_schema.tables where table_name = \'dcae_services_components_maps\')") + @Override Boolean checkIfTableExists(); @Override diff --git a/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java b/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java index b08bec1..2e70550 100644 --- a/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java +++ b/src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java @@ -44,14 +44,12 @@ public class StringListArgument implements ArgumentFactory<List<String>> { } @Override - public Argument build(Class<?> expectedType, List<String> value, StatementContext statementContext) { - return new Argument() { - @Override - public void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException { - Array values = statement.getConnection().createArrayOf("varchar", value.toArray()); - statement.setArray(position, values); - } - }; - } + public Argument build(Class<?> expectedType, List<String> value, StatementContext statementContext) { + Argument argument = (int position, PreparedStatement statement, StatementContext ctx) -> { + Array values = statement.getConnection().createArrayOf("varchar", value.toArray()); + statement.setArray(position, values); + }; + return argument; + } } |