placed select all method in Table.java to remove duplicate code