}
return storedProcedureArguments;
}
@Override
public void setAttributeValueInObject(Object domainObject, Object attributeValue) throws DescriptorException {
StoredProcedureCall spc = (StoredProcedureCall)domainObject;
// vector of parameters/arguments to be added the call
Vector procedureArguments = (Vector)attributeValue;
for (int i = 0; i < procedureArguments.size(); i++) {
StoredProcedureArgument spa = (StoredProcedureArgument)procedureArguments.get(i);
Integer direction = spa.getDirection();
DatabaseField dbField = spa.getDatabaseField();
spc.getProcedureArgumentNames().add(spa.argumentName);
if (direction.equals(IN)) {
if (spa.argumentValue != null) {
spc.appendIn(spa.argumentValue);
}
else {
spc.appendIn(dbField);
}
}
else if (direction.equals(OUT)) {
spc.appendOut(dbField);
}
else if (direction.equals(OUT_CURSOR)) {
spc.appendOutCursor(dbField);
}
else if (direction.equals(INOUT)) {
StoredProcedureInOutArgument spaInOut = (StoredProcedureInOutArgument)spa;
DatabaseField outField = new DatabaseField(spaInOut.outputArgumentName);
outField.type = dbField.type;
if (spaInOut.argumentValue != null) {
spc.appendInOut(spaInOut.argumentValue, outField);
}
else {
spc.appendInOut(dbField, outField);
}
}
}
}