/**
* @see nexj.core.persistence.Query.OperatorFactory#create(nexj.core.scripting.Pair, nexj.core.persistence.Query, Object, byte)
*/
public Operator create(Pair args, Query query, Object key, byte nOutput)
{
UnaryOperator op = create(query);
if (args == null || args.getTail() != null)
{
throw new InvalidQueryException("err.persistence.unaryOperatorArgCount",
new Object[]{op.getSymbol()});
}
if (!op.setOperand(query.createOperator(key, args.getHead(), nOutput)))
{
return null;
}
return op;