Class DuWebEntityRepository<T extends DuWebEntity>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String baseApiUrl  
      protected EntityHttpClient client  
      protected java.lang.String entityType  
      protected java.util.Map<java.lang.String,​java.lang.String> headerMap  
      protected com.fasterxml.jackson.databind.ObjectMapper objectMapper  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T create​(T createEntity)  
      void delete​(java.lang.Long id)  
      java.util.List<T> getAll()  
      java.util.Optional<T> getEntity​(java.lang.Long id)  
      T update​(java.lang.Long id, T updateEntity)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • objectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
      • headerMap

        protected java.util.Map<java.lang.String,​java.lang.String> headerMap
      • entityType

        protected final java.lang.String entityType
    • Constructor Detail

      • DuWebEntityRepository

        public DuWebEntityRepository​(EntityHttpClient client,
                                     java.lang.String entityType)
    • Method Detail

      • getAll

        public java.util.List<T> getAll()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getEntity

        public java.util.Optional<T> getEntity​(java.lang.Long id)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • create

        public T create​(T createEntity)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • update

        public T update​(java.lang.Long id,
                        T updateEntity)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • delete

        public void delete​(java.lang.Long id)