Interface SuperService<E extends DataPresentation<I>,I extends Comparable<? super I> & Serializable>

Type Parameters:
E - The DataPresentation type.
I - The ID of type Comparable and Serializable.

@Transactional(readOnly=true) public interface SuperService<E extends DataPresentation<I>,I extends Comparable<? super I> & Serializable>
The base service interface.

Example:

To create a service interface that inherits from SuperService, follow these steps:

Create a new service interface:

 public interface YourService //
     extends SuperService<YourEntity, YourIdType> {}
 

To create a service class that implements SuperService, follow these steps:

Create a new service class:

 @Service
 public class YourService //
     implements SuperService<YourEntity, YourIdType> {

     // Or implements your interface that extends SuperService.
     private final YourRepository repository;

     public YourService(final YourRepository repository) {

         this.repository = repository;
     }

     public YourRepository getRepository() {

         return this.repository;
     }
 }
 
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default Class<E>
    Retrieves the class of the DataPresentation associated with this service.
    Give the repository use by the service.
  • Method Details

    • getRepository

      SuperRepository<E,I> getRepository()
      Give the repository use by the service.
      Returns:
      A repository.
    • getEntityClass

      default Class<E> getEntityClass()
      Retrieves the class of the DataPresentation associated with this service.
      Returns:
      The class of the DataPresentation.