I have such piece of code:
DataTableFactory<Object> TempDataTableFactory = new DataTableFactory<Object>();
DataTable<Object> tempDataTable = TempDataTableFactory.getInstance();
tempDataTable = dataTable;
ExecutedArguments e = new ExecutedArguments();
e.setDataTable(tempDataTable);
e.setExecutedCommand(cmd);
stack.addNewExecutedCommand(e);
result = operation.execute();
Now I just want to keep the olddataTable
before execution. When I debug my code till the line result = operation.execute();
there is no problem. In that line I change the dataTable
. But because tempDataTable
points to dataTable
it also changes. But I don't want tempDataTable
to change. How can I do this?