public <V extends PrismValue,D extends ItemDefinition> Expression<V,D> makeExpression(ExpressionType expressionType, D outputDefinition, String shortDesc, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException { ExpressionIdentifier eid = new ExpressionIdentifier(expressionType, outputDefinition); Expression<V,D> expression = (Expression<V,D>) cache.get(eid); if (expression == null) { expression = createExpression(expressionType, outputDefinition, shortDesc, task, result); cache.put(eid, expression); } return expression; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + getOuterType().hashCode(); result = prime * result + ((expressionType == null) ? 0 : expressionType.hashCode()); result = prime * result + ((outputDefinition == null) ? 0 : outputDefinition.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ExpressionIdentifier other = (ExpressionIdentifier) obj; if (!getOuterType().equals(other.getOuterType())) return false; if (expressionType == null) { if (other.expressionType != null) return false; } else if (!expressionType.equals(other.expressionType)) return false; if (outputDefinition == null) { if (other.outputDefinition != null) return false; } else if (!outputDefinition.equals(other.outputDefinition)) return false; return true; }