@Override public String getName() { if (this.schema != null) { return this.schema + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }
@Override public String getName() { if (this.qualifier != null) { return this.qualifier + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }
@Override public String getName() { if (this.qualifier != null) { return this.qualifier + Symbol.SEPARATOR + this.getShortName(); } return super.getName(); }
@Override public int hashCode() { if (this.qualifier != null) { return HashCodeUtil.hashCode(this.qualifier.hashCode(), this.getShortName().hashCode()); } return super.hashCode(); }
@Override public int hashCode() { if (this.schema != null) { return HashCodeUtil.hashCode(this.schema.hashCode(), this.getShortName().hashCode()); } return super.hashCode(); }
@Override public int hashCode() { if (this.qualifier != null) { return HashCodeUtil.hashCode(this.qualifier.hashCode(), this.getShortName().hashCode()); } return super.hashCode(); }
/** * Compare group symbols * @param obj Other object to compare * @return True if equivalent */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof GroupSymbol)) { return false; } GroupSymbol other = (GroupSymbol) obj; if (this.qualifier == null || other.qualifier == null) { return this.getName().equals(other.getName()); } return EquivalenceUtil.areEqual(this.qualifier, other.qualifier) && this.getShortName().equals(other.getShortName()); }
/** * Compare group symbols * @param obj Other object to compare * @return True if equivalent */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof GroupSymbol)) { return false; } GroupSymbol other = (GroupSymbol) obj; if (this.schema == null || other.schema == null) { return this.getName().equals(other.getName()); } return EquivalenceUtil.areEqual(this.schema, other.schema) && this.getShortName().equals(other.getShortName()); }
/** * Compare group symbols * @param obj Other object to compare * @return True if equivalent */ public boolean equals(Object obj) { if(this == obj) { return true; } if(!(obj instanceof GroupSymbol)) { return false; } GroupSymbol other = (GroupSymbol) obj; if (this.qualifier == null || other.qualifier == null) { return this.getName().equals(other.getName()); } return EquivalenceUtil.areEqual(this.qualifier, other.qualifier) && this.getShortName().equals(other.getShortName()); }
private static GroupSymbol getVarGroup(TargetedCommand cmd) { if (cmd.getGroup().getShortName().equalsIgnoreCase("X")) { //$NON-NLS-1$ return new GroupSymbol("X1"); //$NON-NLS-1$ } return new GroupSymbol("X"); //$NON-NLS-1$ }
private static GroupSymbol getVarGroup(TargetedCommand cmd) { if (cmd.getGroup().getShortName().equalsIgnoreCase("X")) { //$NON-NLS-1$ return new GroupSymbol("X1"); //$NON-NLS-1$ } return new GroupSymbol("X"); //$NON-NLS-1$ }
private static GroupSymbol getVarGroup(TargetedCommand cmd) { if (cmd.getGroup().getShortName().equalsIgnoreCase("X")) { //$NON-NLS-1$ return new GroupSymbol("X1"); //$NON-NLS-1$ } return new GroupSymbol("X"); //$NON-NLS-1$ }
private boolean applyGlobalTableHint(PlanNode plan, NodeConstants.Info hintProperty, String groupName, Object value) { GroupSymbol gs = new GroupSymbol(groupName); List<String> nameParts = StringUtil.split(gs.getName(), "."); //$NON-NLS-1$ PlanNode root = plan; boolean found = true; for (int i = 0; i < nameParts.size() && found; i++) { String part = nameParts.get(i); boolean leaf = i == nameParts.size() - 1; found = false; for (PlanNode child : root.getChildren()) { for (PlanNode planNode : NodeEditor.findAllNodes(child, NodeConstants.Types.SOURCE, NodeConstants.Types.SOURCE)) { if (part.equalsIgnoreCase(planNode.getGroups().iterator().next().getShortName())) { if (leaf) { planNode.setProperty(hintProperty, value); return true; } else if (planNode.getChildren().isEmpty()) { return false; } root = planNode; found = true; break; } } } } return false; }
private boolean applyGlobalTableHint(PlanNode plan, NodeConstants.Info hintProperty, String groupName, Object value) { GroupSymbol gs = new GroupSymbol(groupName); List<String> nameParts = StringUtil.split(gs.getName(), "."); //$NON-NLS-1$ PlanNode root = plan; boolean found = true; for (int i = 0; i < nameParts.size() && found; i++) { String part = nameParts.get(i); boolean leaf = i == nameParts.size() - 1; found = false; for (PlanNode child : root.getChildren()) { for (PlanNode planNode : NodeEditor.findAllNodes(child, NodeConstants.Types.SOURCE, NodeConstants.Types.SOURCE)) { if (part.equalsIgnoreCase(planNode.getGroups().iterator().next().getShortName())) { if (leaf) { planNode.setProperty(hintProperty, value); return true; } else if (planNode.getChildren().isEmpty()) { return false; } root = planNode; found = true; break; } } } } return false; }
private boolean applyGlobalTableHint(PlanNode plan, NodeConstants.Info hintProperty, String groupName, Object value) { GroupSymbol gs = new GroupSymbol(groupName); List<String> nameParts = StringUtil.split(gs.getName(), "."); //$NON-NLS-1$ PlanNode root = plan; boolean found = true; for (int i = 0; i < nameParts.size() && found; i++) { String part = nameParts.get(i); boolean leaf = i == nameParts.size() - 1; found = false; for (PlanNode child : root.getChildren()) { for (PlanNode planNode : NodeEditor.findAllNodes(child, NodeConstants.Types.SOURCE, NodeConstants.Types.SOURCE)) { if (part.equalsIgnoreCase(planNode.getGroups().iterator().next().getShortName())) { if (leaf) { planNode.setProperty(hintProperty, value); return true; } else if (planNode.getChildren().isEmpty()) { return false; } root = planNode; found = true; break; } } } } return false; }
/** * Return a deep copy of this object. * @return Deep copy of the object */ public GroupSymbol clone() { GroupSymbol copy = new GroupSymbol(schema, getShortName(), getDefinition()); copy.metadataID = this.metadataID; copy.setIsTempTable(isTempTable); copy.setProcedure(isProcedure); copy.outputDefinition = this.outputDefinition; copy.outputName = this.outputName; copy.isGlobalTable = isGlobalTable; copy.checkMatViewStatus = checkMatViewStatus; return copy; }
/** * Return a deep copy of this object. * @return Deep copy of the object */ public GroupSymbol clone() { GroupSymbol copy = new GroupSymbol(qualifier, getShortName(), getDefinition()); copy.metadataID = this.metadataID; copy.setIsTempTable(isTempTable); copy.setProcedure(isProcedure); copy.outputDefinition = this.outputDefinition; copy.outputName = this.outputName; copy.isGlobalTable = isGlobalTable; copy.checkMatViewStatus = checkMatViewStatus; return copy; }
/** * Return a deep copy of this object. * @return Deep copy of the object */ public GroupSymbol clone() { GroupSymbol copy = new GroupSymbol(qualifier, getShortName(), getDefinition()); copy.metadataID = this.metadataID; copy.setIsTempTable(isTempTable); copy.setProcedure(isProcedure); copy.outputDefinition = this.outputDefinition; copy.outputName = this.outputName; copy.isGlobalTable = isGlobalTable; copy.checkMatViewStatus = checkMatViewStatus; return copy; }
Expression value = entry.getValue(); params.put(entry.getKey(), value); if (entry.getKey().getGroupSymbol().getShortName().equalsIgnoreCase(SQLConstants.Reserved.NEW) && userCommand instanceof Update) { ((Query)query).getSelect().addSymbol(value);
variable.setOutputName(outputName); } else { if (gs.getSchema() != null || !gs.getShortName().equalsIgnoreCase(ProcedureReservedWords.VARIABLES)) { handleUnresolvableDeclaration(variable, QueryPlugin.Util.getString("ERR.015.010.0031", new Object[]{ProcedureReservedWords.VARIABLES, variable})); //$NON-NLS-1$