USER - the type of the userREPUTATION - the type of the reputationTIME - the type of the timeENTRY - the type of the entry holding the reputationDBO - the type of the database object holding the reputationDAO - the type of the domain access object holding reputationsRESPONSE - the type of the response to the actionpublic class DatabaseReputationManager<USER,REPUTATION,TIME,ENTRY extends net.ashwork.upvote.domain.ReputationEntry<USER,REPUTATION,TIME>,DBO,DAO extends InsertDao<DBO>,RESPONSE> extends AbstractDatabaseManager<ENTRY,DBO,DAO,RESPONSE> implements net.ashwork.upvote.manager.ReputationManager<USER,REPUTATION,TIME,ENTRY,RESPONSE>
ReputationManager for a database.dao, persistSuccess, throwingError, transformer| Constructor and Description |
|---|
DatabaseReputationManager(DAO dao,
java.util.function.Function<ENTRY,DBO> transformer,
java.util.function.IntFunction<RESPONSE> persistSuccess,
java.util.function.Function<java.lang.Throwable,RESPONSE> throwingError)
A simple constructor.
|
putEntrypublic DatabaseReputationManager(DAO dao, java.util.function.Function<ENTRY,DBO> transformer, java.util.function.IntFunction<RESPONSE> persistSuccess, java.util.function.Function<java.lang.Throwable,RESPONSE> throwingError)
dao - the domain access object of the tabletransformer - a function to transform the entry to a database objectpersistSuccess - a function to convert a successful insertion to a responsethrowingError - a function to convert a thrown throwable to a response