Skip to content

Commit

Permalink
cleanUp
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-nikitko committed Aug 9, 2023
1 parent 7b68d15 commit f87a1e8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.apache.cayenne.access.sqlbuilder.sqltree.Node;
import org.apache.cayenne.access.sqlbuilder.sqltree.ValueNode;
import org.apache.cayenne.exp.parser.ASTScalar;
import org.apache.cayenne.map.DbAttribute;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ public ValueNode(Object value, boolean isArray, DbAttribute attribute, boolean n
this.needBinding = needBinding;
}

public ValueNode(Object value, boolean isArray, DbAttribute attribute) {
super(NodeType.VALUE);
this.value = value;
this.isArray = isArray;
this.attribute = attribute;
this.needBinding = true;
}

public Object getValue() {
return value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected void onColumnNode(Node parent, ColumnNode child, int index) {

@Override
protected void onValueNode(Node parent, ValueNode child, int index) {
Node replacement = new DerbyValueNode(child.getValue(), child.isArray(), child.getAttribute());
Node replacement = new DerbyValueNode(child.getValue(), child.isArray(), child.getAttribute(), child.isNeedBinding());
replaceChild(parent, index, replacement, false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected void onColumnNode(Node parent, ColumnNode child, int index) {

@Override
protected void onValueNode(Node parent, ValueNode child, int index) {
replaceChild(parent, index, new DerbyValueNode(child.getValue(), child.isArray(), child.getAttribute()));
replaceChild(parent, index, new DerbyValueNode(child.getValue(), child.isArray(), child.getAttribute(), child.isNeedBinding()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
*/
public class DerbyValueNode extends ValueNode {

public DerbyValueNode(Object value, boolean isArray, DbAttribute attribute) {
super(value, isArray, attribute);
public DerbyValueNode(Object value, boolean isArray, DbAttribute attribute, boolean needBinding) {
super(value, isArray, attribute, needBinding);
}

protected void appendStringValue(QuotingAppendable buffer, CharSequence value) {
Expand All @@ -46,6 +46,6 @@ protected void appendStringValue(QuotingAppendable buffer, CharSequence value) {

@Override
public Node copy() {
return new DerbyValueNode(getValue(), isArray(), getAttribute());
return new DerbyValueNode(getValue(), isArray(), getAttribute(), isNeedBinding());
}
}

0 comments on commit f87a1e8

Please sign in to comment.