Class DataSvc

  • All Implemented Interfaces:
    DataService

    @Singleton
    public class DataSvc
    extends java.lang.Object
    implements DataService
    • Constructor Summary

      Constructors 
      Constructor Description
      DataSvc​(dagger.Lazy<DBSystem> dbSystem)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <A,​B>
      B
      mapTo​(java.lang.Class<B> toType, A from)  
      <A> java.util.Optional<A> pull​(java.lang.Class<A> type)  
      <S,​P>
      java.util.Optional<S>
      pull​(java.lang.Class<S> type, P parameter)  
      <A> DataService push​(java.lang.Class<A> type, A data)  
      <A> DataService registerConsumer​(java.lang.Class<A> type, java.util.function.Consumer<A> consumer)  
      <P,​S>
      DataService
      registerDBSupplier​(java.lang.Class<S> type, java.lang.Class<P> parameterType, java.util.function.Function<P,​Query<S>> queryVisitor)  
      <A,​B>
      DataService
      registerMapper​(java.lang.Class<A> typeA, java.lang.Class<B> typeB, java.util.function.Function<A,​B> mapper)  
      <A> DataService registerSupplier​(java.lang.Class<A> type, java.util.function.Supplier<A> supplier)  
      <P,​S>
      DataService
      registerSupplier​(java.lang.Class<S> type, java.lang.Class<P> parameterType, java.util.function.Function<P,​S> supplierWithParameter)  
      • Methods inherited from class java.lang.Object

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

      • DataSvc

        @Inject
        public DataSvc​(dagger.Lazy<DBSystem> dbSystem)
    • Method Detail

      • pull

        public <A> java.util.Optional<A> pull​(java.lang.Class<A> type)
        Specified by:
        pull in interface DataService
      • mapTo

        public <A,​B> B mapTo​(java.lang.Class<B> toType,
                                   A from)
        Specified by:
        mapTo in interface DataService
      • registerMapper

        public <A,​B> DataService registerMapper​(java.lang.Class<A> typeA,
                                                      java.lang.Class<B> typeB,
                                                      java.util.function.Function<A,​B> mapper)
        Specified by:
        registerMapper in interface DataService
      • registerConsumer

        public <A> DataService registerConsumer​(java.lang.Class<A> type,
                                                java.util.function.Consumer<A> consumer)
        Specified by:
        registerConsumer in interface DataService
      • registerSupplier

        public <A> DataService registerSupplier​(java.lang.Class<A> type,
                                                java.util.function.Supplier<A> supplier)
        Specified by:
        registerSupplier in interface DataService
      • pull

        public <S,​P> java.util.Optional<S> pull​(java.lang.Class<S> type,
                                                      P parameter)
        Specified by:
        pull in interface DataService
      • registerSupplier

        public <P,​S> DataService registerSupplier​(java.lang.Class<S> type,
                                                        java.lang.Class<P> parameterType,
                                                        java.util.function.Function<P,​S> supplierWithParameter)
        Specified by:
        registerSupplier in interface DataService
      • registerDBSupplier

        public <P,​S> DataService registerDBSupplier​(java.lang.Class<S> type,
                                                          java.lang.Class<P> parameterType,
                                                          java.util.function.Function<P,​Query<S>> queryVisitor)
        Specified by:
        registerDBSupplier in interface DataService