Check out example codes for "spring data jpa inheritance repository". It will help you in understanding the concepts better.

Code Example 1

@NoRepositoryBean
public interface AbstractRepository<T extends AbstractEquipment> 
        extends CrudRepository<T, Long>{

 @Query("select e from #{#entityName} as e from equipment where e.name = equipmentName")
 T findEquipmentByName(String equipmentName);

}

Code Example 2

@Transactional
public interface SpecialEquipmentRepo extends AbstractRepository<SpecialEquipment,Long>{

}

Learn ReactJs, React Native from akashmittal.com