@Override public String getName() { if (this.groupSymbol != null) { return this.groupSymbol.getName() + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }
@Override public WindowFunction clone() { WindowFunction clone = new WindowFunction(); clone.setFunction((AggregateSymbol) this.function.clone()); clone.setWindowSpecification(this.windowSpecification.clone()); return clone; }
public Expression replaceExpression(Expression element) { if (element instanceof Function && !(element instanceof AggregateSymbol) && ((Function) element).isAggregate()) { Function f = (Function)element; AggregateSymbol as = new AggregateSymbol(f.getName(), false, f.getArgs(), null); as.setType(f.getType()); as.setFunctionDescriptor(f.getFunctionDescriptor()); return as; } return element; } };
/** * Return a deep copy of this object * @return Deep copy of this object */ public Object clone() { Expression clonedExpr = null; if(getExpression() != null) { clonedExpr = (Expression) getExpression().clone(); } ExpressionSymbol copy = new ExpressionSymbol(getName(), clonedExpr); return copy; }
@Override public XMLSerialize clone() { XMLSerialize clone = new XMLSerialize(); clone.document = this.document; clone.expression = (Expression)this.expression.clone(); clone.typeString = this.typeString; clone.type = this.type; clone.declaration = this.declaration; clone.version = this.version; clone.encoding = this.encoding; return clone; }
public void testGetType() { CaseExpression expr = example(4); assertNull(expr.getType()); expr.setType(Integer.class); assertEquals(Integer.class, expr.getType()); }
/** Long element from unaliased group: "m.g.c" */ public static final ElementSymbol sampleElement2() { ElementSymbol element = new ElementSymbol("m.g.c"); //$NON-NLS-1$ element.setGroupSymbol(sampleGroup1()); return element; }
public Class<?> getType() { if (this.isPositional() && this.expression == null) { return type; } return expression.getType(); }
public static final Expression getExpression(Expression symbol) { if (symbol instanceof AliasSymbol) { symbol = ((AliasSymbol)symbol).getSymbol(); } if (symbol instanceof ExpressionSymbol) { ExpressionSymbol exprSymbol = (ExpressionSymbol)symbol; return exprSymbol.getExpression(); } return symbol; }
public void testEquals3() { AggregateSymbol as1 = new AggregateSymbol(NonReserved.COUNT, true, sampleElement()); //$NON-NLS-1$ AggregateSymbol as2 = new AggregateSymbol(NonReserved.COUNT, true, sampleElement()); //$NON-NLS-1$ helpEquals(as1, as2, true); }
Integer getWindowStartOffset() { if (windowFrame.getStart().getBoundMode() == BoundMode.CURRENT_ROW) { return 0; } if (windowFrame.getStart().getBound() == null) { return null; } return (windowFrame.getStart().getBoundMode() == BoundMode.PRECEDING?-1:1)*windowFrame.getStart().getBound(); }
Integer getWindowEndOffset() { if (windowFrame.getEnd() == null || windowFrame.getEnd().getBoundMode() == BoundMode.CURRENT_ROW) { return 0; } if (windowFrame.getEnd().getBound() == null) { return null; } return (windowFrame.getEnd().getBoundMode() == BoundMode.PRECEDING?-1:1)*windowFrame.getEnd().getBound(); }
@Override public WindowFunction clone() { WindowFunction clone = new WindowFunction(); clone.setFunction((AggregateSymbol) this.function.clone()); clone.setWindowSpecification(this.windowSpecification.clone()); return clone; }
@Override public String getName() { if (this.groupSymbol != null) { return this.groupSymbol.getName() + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }
@Override public XMLSerialize clone() { XMLSerialize clone = new XMLSerialize(); clone.document = this.document; clone.expression = (Expression)this.expression.clone(); clone.typeString = this.typeString; clone.type = this.type; clone.declaration = this.declaration; clone.version = this.version; clone.encoding = this.encoding; return clone; }
public Class<?> getType() { if (this.isPositional() && this.expression == null) { return type; } return expression.getType(); }
@Override public WindowFunction clone() { WindowFunction clone = new WindowFunction(); clone.setFunction((AggregateSymbol) this.function.clone()); clone.setWindowSpecification(this.windowSpecification.clone()); return clone; }
@Override public String getName() { if (this.groupSymbol != null) { return this.groupSymbol.getName() + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }