The following document contains the results of PMD's CPD 5.0.2.
| File | Line |
|---|---|
| org/xchain/namespaces/hibernate/AbstractQueryResultCommand.java | 35 |
| org/xchain/namespaces/hibernate/GetCommand.java | 73 |
@Attribute(localName="result", type=AttributeType.QNAME)
public abstract String getResult( JXPathContext context);
public abstract boolean hasResult();
/**
* The variable of where to store the result. If the variable does not yet exist, a variable will be declared.
*/
@Attribute(localName="variable", type=AttributeType.QNAME)
public abstract String getVariable( JXPathContext context);
public abstract boolean hasVariable();
/**
* The scope of the variable.
* @see Scope
*/
@Attribute(localName="scope", type=AttributeType.LITERAL, defaultValue="execution")
public abstract Scope getScope(JXPathContext context);
protected void storeValue(JXPathContext context, Object value) throws Exception {
if (hasResult()) {
// TODO This should check that the path exists first. If it doesn't exist, create it.
context.setValue(getResult(context), value);
} else if (hasVariable()) {
((ScopedQNameVariables)context.getVariables()).declareVariable( getVariable(context), value, getScope(context) );
} else {
throw new Exception("Result or Variable must be given.");
}
} | |