Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface EntityRepository extends EntityRepositoryCustom, CrudRepository<Entity, String> {
- }
- public interface EntityRepositoryCustom {
- public Page<Entity> findEntitisOnCondition(Entity t, Pageable pageable);
- }
- public class EntityRepositoryCustomImpl<Entity> extends SelfDefinedRepositoryImpl<Entity> {
- @Override
- protected String getSOmething() {
- ...
- }
- }
- public interface SelfDefinedRepository<T, ID extends Serializable> extends CrudRepository<T, ID> {
- Page<T> findEntitisOnCondition(T t, Pageable pageable);
- }
- public abstract class SelfDefinedRepositoryImpl<T, ID extends Serializable> implements SelfDefinedRepository<T, Serializable>{
- public Page<T> findEventsOnCondition(T t, Pageable pageable) {
- ...
- getSomething();
- ...
- }
- protected abstract String getSomething();
- }
Add Comment
Please, Sign In to add comment