Skip to content

Commit

Permalink
identifying batch parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
zenbones committed Oct 14, 2024
1 parent ea035ea commit 6f77a5b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@
public abstract class BatchParameter<T> {

private final T value;
private final boolean identifying;

public BatchParameter (T value) {
public BatchParameter (T value, boolean identifying) {

this.value = value;
this.identifying = identifying;
}

public abstract ParameterType getType ();
Expand All @@ -47,4 +49,9 @@ public T getValue () {

return value;
}

public boolean isIdentifying () {

return identifying;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@

public class BatchParameters extends HashMap<String, BatchParameter<?>> {

public void putDate (String key, Date aDate) {
public void putDate (String key, Date aDate, boolean identifying) {

put(key, new DateBatchParameter(aDate));
put(key, new DateBatchParameter(aDate, identifying));
}

public void putDouble (String key, Double aDouble) {
public void putDouble (String key, Double aDouble, boolean identifying) {

put(key, new DoubleBatchParameter(aDouble));
put(key, new DoubleBatchParameter(aDouble, identifying));
}

public void putLong (String key, Long aLong) {
public void putLong (String key, Long aLong, boolean identifying) {

put(key, new LongBatchParameter(aLong));
put(key, new LongBatchParameter(aLong, identifying));
}

public void putString (String key, String aString) {
public void putString (String key, String aString, boolean identifying) {

put(key, new StringBatchParameter(aString));
put(key, new StringBatchParameter(aString, identifying));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

public class DateBatchParameter extends BatchParameter<Date> {

public DateBatchParameter (Date value) {
public DateBatchParameter (Date value, boolean identifying) {

super(value);
super(value, identifying);
}

@Override
Expand All @@ -47,4 +47,3 @@ public ParameterType getType () {
return ParameterType.DATE;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

public class DoubleBatchParameter extends BatchParameter<Double> {

public DoubleBatchParameter (Double value) {
public DoubleBatchParameter (Double value, boolean identifying) {

super(value);
super(value, identifying);
}

@Override
Expand All @@ -45,4 +45,3 @@ public ParameterType getType () {
return ParameterType.DOUBLE;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

public class LongBatchParameter extends BatchParameter<Long> {

public LongBatchParameter (Long value) {
public LongBatchParameter (Long value, boolean identifying) {

super(value);
super(value, identifying);
}

@Override
Expand All @@ -45,4 +45,3 @@ public ParameterType getType () {
return ParameterType.LONG;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

public class StringBatchParameter extends BatchParameter<String> {

public StringBatchParameter (String value) {
public StringBatchParameter (String value, boolean identifying) {

super(value);
super(value, identifying);
}

@Override
Expand Down

0 comments on commit 6f77a5b

Please sign in to comment.