summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/dcae/inventory/dbthings/StringListArgument.java16
1 files changed, 7 insertions, 9 deletions
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;
+ }
}