I have a scenario where I need to fetch data from 20 tables in an Oracle database. I have 20 entity classes and I am using Spring JPA for getting data. I am using Simple Crud operation for getting data like 
{

```
public interface Object1Repository extends CrudRepository<Object1, Long> {

  List<Object1> findAll();
}

```

}

same for table2
{

```
public interface Object2Repository extends CrudRepository<Object2, Long> {

  List<Object2> findAll();
}

```

}

and so on for table3, table4 etc...

So my question is do I need to create 20 such interface repositories to fetch data from database or is there a better way of doing it something like:

{

```
public interface CommonRepository extends CrudRepository<GenericObject, Long> {

  List<Object1> findAll();
  List<Object2> findAll();
  List<Object3> findAll();
  List<Object4> findAll();
  ...
}

```

}