public Object execute(final Object... iArgs) {
return executeInContext(null, iArgs);
}
public Object executeInContext(final OCommandContext iContext, final Object... iArgs) {
final OCommandExecutorFunction command = new OCommandExecutorFunction();
command.parse(new OCommandFunction(getName()));
final List<String> params = getParameters();
// CONVERT PARAMETERS IN A MAP
Map<Object, Object> args = null;
if (iArgs.length > 0) {
args = new LinkedHashMap<Object, Object>();
for (int i = 0; i < iArgs.length; ++i) {
// final Object argValue = ORecordSerializerStringAbstract.getTypeValue(iArgs[i].toString());
final Object argValue = iArgs[i];
if (params != null && i < params.size())
args.put(params.get(i), argValue);
else
args.put("param" + i, argValue);
}
}
return command.executeInContext(iContext, args);
}