public static UpdateSet updateSet() { return new UpdateSet(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } UpdateStream that = (UpdateStream) o; if (onUpdateExpression != null ? !onUpdateExpression.equals(that.onUpdateExpression) : that.onUpdateExpression != null) { return false; } return updateSetter != null ? updateSetter.equals(that.updateSetter) : that.updateSetter == null; }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (onUpdateExpression != null ? onUpdateExpression.hashCode() : 0); result = 31 * result + (updateSetter != null ? updateSetter.hashCode() : 0); return result; } }
/** * {@inheritDoc} * <p>The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.</p> * * @param ctx */ @Override public UpdateSet visitSet_clause(@NotNull SiddhiQLParser.Set_clauseContext ctx) { UpdateSet updateSet = new UpdateSet(); for (SiddhiQLParser.Set_assignmentContext setAssignmentContext : ctx.set_assignment()) { updateSet.set(((Variable) visit(setAssignmentContext.attribute_reference())), (Expression) visit(setAssignmentContext.expression())); } populateQueryContext(updateSet, ctx); return updateSet; }
/** * Generates a QueryOutputConfig of type 'update' * @param updateStream Siddhi UpdateStream * @return QueryOutputConfig * @throws DesignGenerationException Error while generating QueryOutputConfig */ private QueryOutputConfig generateUpdateOutputConfig(UpdateStream updateStream) throws DesignGenerationException { List<SetAttributeConfig> setAttributeConfigList = null; if (updateStream.getUpdateSet() != null) { setAttributeConfigList = generateSetAttributeConfigsList(updateStream.getUpdateSet().getSetAttributeList()); } return new QueryOutputConfig( QueryOutputType.UPDATE.toString(), new UpdateInsertIntoOutputConfig( updateStream.getOutputEventType().name(), setAttributeConfigList, ConfigBuildingUtilities.getDefinition(updateStream.getOnUpdateExpression(), siddhiAppString)), updateStream.getId()); }
/** * Generates a QueryOutputConfig of type 'update or insert into' * @param updateOrInsertStream Siddhi UpdateOrInsertStream * @return QueryOutputConfig * @throws DesignGenerationException Error while generating QueryOutputConfig */ private QueryOutputConfig generateUpdateOrInsertIntoOutputConfig(UpdateOrInsertStream updateOrInsertStream) throws DesignGenerationException { List<SetAttributeConfig> setAttributeConfigList = null; if (updateOrInsertStream.getUpdateSet() != null) { setAttributeConfigList = generateSetAttributeConfigsList(updateOrInsertStream.getUpdateSet().getSetAttributeList()); } return new QueryOutputConfig( QueryOutputType.UPDATE_OR_INSERT_INTO.toString(), new UpdateInsertIntoOutputConfig( updateOrInsertStream.getOutputEventType().name(), setAttributeConfigList, ConfigBuildingUtilities.getDefinition( updateOrInsertStream.getOnUpdateExpression(), siddhiAppString)), updateOrInsertStream.getId()); }
public static UpdateSet updateSet() { return new UpdateSet(); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (onUpdateExpression != null ? onUpdateExpression.hashCode() : 0); result = 31 * result + (updateSetter != null ? updateSetter.hashCode() : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } UpdateOrInsertStream that = (UpdateOrInsertStream) o; if (onUpdateExpression != null ? !onUpdateExpression.equals(that.onUpdateExpression) : that.onUpdateExpression != null) { return false; } return updateSetter != null ? updateSetter.equals(that.updateSetter) : that.updateSetter == null; }
public static UpdateSet updateSet() { return new UpdateSet(); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (onUpdateExpression != null ? onUpdateExpression.hashCode() : 0); result = 31 * result + (updateSetter != null ? updateSetter.hashCode() : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } UpdateOrInsertStream that = (UpdateOrInsertStream) o; if (onUpdateExpression != null ? !onUpdateExpression.equals(that.onUpdateExpression) : that.onUpdateExpression != null) { return false; } return updateSetter != null ? updateSetter.equals(that.updateSetter) : that.updateSetter == null; }
public static UpdateSet updateSet() { return new UpdateSet(); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (onUpdateExpression != null ? onUpdateExpression.hashCode() : 0); result = 31 * result + (updateSetter != null ? updateSetter.hashCode() : 0); return result; } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } UpdateStream that = (UpdateStream) o; if (onUpdateExpression != null ? !onUpdateExpression.equals(that.onUpdateExpression) : that.onUpdateExpression != null) { return false; } return updateSetter != null ? updateSetter.equals(that.updateSetter) : that.updateSetter == null; }