public Object invoke(XRServiceAdapter xrService, Invocation invocation) {
ReadObjectQuery roq =
(ReadObjectQuery)classDescriptor.getQueryManager().getQuery(PK_QUERYNAME);
List queryArguments = roq.getArguments();
int queryArgumentsSize = queryArguments.size();
Vector executeArguments = new NonSynchronizedVector();
for (int i = 0; i < queryArgumentsSize; i++) {
String argName = (String)queryArguments.get(i);
executeArguments.add(invocation.getParameter(argName));
}
UnitOfWork uow = xrService.getORSession().acquireUnitOfWork();
Object toBeDeleted = uow.executeQuery(roq, executeArguments);
if (toBeDeleted != null) {
uow.deleteObject(toBeDeleted);