Updated Condition All Rows on Replace By Expression
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@113622 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b699cc27e8
commit
40aff27b87
|
@ -59,13 +59,17 @@ public class OpExecution4ReplaceColumnByExpression extends OpExecutionBuilder {
|
|||
Expression value = ExpressionGenerator
|
||||
.genReplaceValueParameterValue(replaceColumnByExpressionSession);
|
||||
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_CONDITION,
|
||||
conditionExpression);
|
||||
if (!replaceColumnByExpressionSession.isAllRows()) {
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_CONDITION,
|
||||
conditionExpression);
|
||||
}
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_VALUE,
|
||||
value);
|
||||
} else {
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_CONDITION,
|
||||
conditionExpression);
|
||||
if (!replaceColumnByExpressionSession.isAllRows()) {
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_CONDITION,
|
||||
conditionExpression);
|
||||
}
|
||||
map.put(Constants.PARAMETER_REPLACE_BY_EXPRESSION_COLUMN_VALUE,
|
||||
replaceExpression);
|
||||
}
|
||||
|
|
|
@ -7,40 +7,41 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.expression.C_Expressi
|
|||
|
||||
/**
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
* @author giancarlo email: <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ReplaceColumnByExpressionSession implements Serializable{
|
||||
public class ReplaceColumnByExpressionSession implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3940140817918362233L;
|
||||
private ColumnData column;
|
||||
private boolean allRows;
|
||||
private C_Expression cConditionExpression;
|
||||
private C_Expression cReplaceExpression;
|
||||
private String replaceValue;
|
||||
private boolean replaceByValue;
|
||||
|
||||
public ReplaceColumnByExpressionSession(){
|
||||
|
||||
|
||||
public ReplaceColumnByExpressionSession() {
|
||||
|
||||
}
|
||||
|
||||
public ReplaceColumnByExpressionSession(ColumnData column, C_Expression cConditionExpression,
|
||||
String replaceValue){
|
||||
this.column=column;
|
||||
this.cConditionExpression=cConditionExpression;
|
||||
this.replaceValue=replaceValue;
|
||||
this.replaceByValue=true;
|
||||
|
||||
public ReplaceColumnByExpressionSession(ColumnData column, boolean allRows,
|
||||
C_Expression cConditionExpression, String replaceValue) {
|
||||
this.column = column;
|
||||
this.allRows = allRows;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
this.replaceValue = replaceValue;
|
||||
this.replaceByValue = true;
|
||||
}
|
||||
|
||||
public ReplaceColumnByExpressionSession(ColumnData column, C_Expression cConditionExpression,
|
||||
C_Expression cReplaceExpression){
|
||||
this.column=column;
|
||||
this.cConditionExpression=cConditionExpression;
|
||||
this.cReplaceExpression=cReplaceExpression;
|
||||
this.replaceByValue=false;
|
||||
|
||||
public ReplaceColumnByExpressionSession(ColumnData column, boolean allRows,
|
||||
C_Expression cConditionExpression, C_Expression cReplaceExpression) {
|
||||
this.column = column;
|
||||
this.allRows = allRows;
|
||||
this.cConditionExpression = cConditionExpression;
|
||||
this.cReplaceExpression = cReplaceExpression;
|
||||
this.replaceByValue = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ColumnData getColumn() {
|
||||
return column;
|
||||
|
@ -50,6 +51,14 @@ public class ReplaceColumnByExpressionSession implements Serializable{
|
|||
this.column = column;
|
||||
}
|
||||
|
||||
public boolean isAllRows() {
|
||||
return allRows;
|
||||
}
|
||||
|
||||
public void setAllRows(boolean allRows) {
|
||||
this.allRows = allRows;
|
||||
}
|
||||
|
||||
public C_Expression getcConditionExpression() {
|
||||
return cConditionExpression;
|
||||
}
|
||||
|
@ -91,8 +100,4 @@ public class ReplaceColumnByExpressionSession implements Serializable{
|
|||
+ replaceByValue + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue