Class Helper

java.lang.Object
com.myhrcrmproject.service.utills.Helper

public class Helper extends Object
  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • setEntityById

      public static <T> void setEntityById(Supplier<Integer> getFromRequestFunction, Consumer<T> setToEntityFunction, org.springframework.data.jpa.repository.JpaRepository<T,Integer> repository, String entityName)
    • findAllByEntityId

      public static <E, T, R> List<R> findAllByEntityId(Integer id, org.springframework.data.jpa.repository.JpaRepository<T,Integer> repository, Function<T,List<E>> taskMappingFunction, Function<E,R> dtoMappingFunction)
    • findAllByEnumId

      public static <T extends Enum<T>, E, R> List<R> findAllByEnumId(Integer id, Class<T> enumType, Function<T,List<E>> taskMappingFunction, Function<E,R> dtoMappingFunction)