Package com.djrapitops.plan
Class DataSvc
- java.lang.Object
-
- com.djrapitops.plan.DataSvc
-
- All Implemented Interfaces:
DataService
@Singleton public class DataSvc extends java.lang.Object implements DataService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.djrapitops.plan.DataService
DataService.Mapping
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A,B>
BmapTo(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>
DataServiceregisterDBSupplier(java.lang.Class<S> type, java.lang.Class<P> parameterType, java.util.function.Function<P,Query<S>> queryVisitor)
<A,B>
DataServiceregisterMapper(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>
DataServiceregisterSupplier(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
-
Methods inherited from interface com.djrapitops.plan.DataService
pull, pull
-
-
-
-
Constructor Detail
-
DataSvc
@Inject public DataSvc(dagger.Lazy<DBSystem> dbSystem)
-
-
Method Detail
-
push
public <A> DataService push(java.lang.Class<A> type, A data)
- Specified by:
push
in interfaceDataService
-
pull
public <A> java.util.Optional<A> pull(java.lang.Class<A> type)
- Specified by:
pull
in interfaceDataService
-
mapTo
public <A,B> B mapTo(java.lang.Class<B> toType, A from)
- Specified by:
mapTo
in interfaceDataService
-
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 interfaceDataService
-
registerConsumer
public <A> DataService registerConsumer(java.lang.Class<A> type, java.util.function.Consumer<A> consumer)
- Specified by:
registerConsumer
in interfaceDataService
-
registerSupplier
public <A> DataService registerSupplier(java.lang.Class<A> type, java.util.function.Supplier<A> supplier)
- Specified by:
registerSupplier
in interfaceDataService
-
pull
public <S,P> java.util.Optional<S> pull(java.lang.Class<S> type, P parameter)
- Specified by:
pull
in interfaceDataService
-
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 interfaceDataService
-
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 interfaceDataService
-
-