/** * Create a set query involving the supplied left- and right-hand-side queries. * * @param left the left-hand-side query being combined * @param operation the set operation * @param right the right-hand-side query being combined * @param all true if all of the results should be included * @throws IllegalArgumentException if the left-hand-side query, right-hand-side query, or operation are null */ public SetQuery( QueryCommand left, Operation operation, QueryCommand right, boolean all ) { CheckArg.isNotNull(left, "left"); CheckArg.isNotNull(right, "right"); CheckArg.isNotNull(operation, "operation"); if (!unionableColumns(left.columns(), right.columns())) { I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns; throw new IllegalArgumentException(msg.text(left.columns(), right.columns())); } this.left = left; this.right = right; this.operation = operation; this.all = all; this.orderings = Collections.<Ordering>emptyList(); this.limits = Limit.NONE; this.hc = HashCode.compute(this.left, this.right, this.operation); }
/** * Create a set query involving the supplied left- and right-hand-side queries. * * @param left the left-hand-side query being combined * @param operation the set operation * @param right the right-hand-side query being combined * @param all true if all of the results should be included * @throws IllegalArgumentException if the left-hand-side query, right-hand-side query, or operation are null */ public SetQuery( QueryCommand left, Operation operation, QueryCommand right, boolean all ) { CheckArg.isNotNull(left, "left"); CheckArg.isNotNull(right, "right"); CheckArg.isNotNull(operation, "operation"); if (!unionableColumns(left.columns(), right.columns())) { I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns; throw new IllegalArgumentException(msg.text(left.columns(), right.columns())); } this.left = left; this.right = right; this.operation = operation; this.all = all; this.orderings = Collections.<Ordering>emptyList(); this.limits = Limit.NONE; this.hc = HashCode.compute(this.left, this.right, this.operation); }
CheckArg.isNotNull(right, "right"); CheckArg.isNotNull(operation, "operation"); if (!unionableColumns(left.columns(), right.columns())) { I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns; throw new IllegalArgumentException(msg.text(left.columns(), right.columns()));
CheckArg.isNotNull(right, "right"); CheckArg.isNotNull(operation, "operation"); if (!unionableColumns(left.columns(), right.columns())) { I18n msg = GraphI18n.leftAndRightQueriesInSetQueryMustHaveUnionableColumns; throw new IllegalArgumentException(msg.text(left.columns(), right.columns()));