net.lightapi.portal.db.PortalDbProvider Maven / Gradle / Ivy
package net.lightapi.portal.db;
import com.networknt.db.provider.DbProvider;
import com.networknt.monad.Result;
import net.lightapi.portal.market.*;
import net.lightapi.portal.user.*;
import java.util.Map;
/**
* Interface class provide the contract for different database implementation for the portal. Mainly, the data is
* saved in the database. However, for some temp date like the oauth code, it is saved in the memory. The Kafka
* event will be used to sync the data between the memory caches.
*
* @author Steve Hu
*/
public interface PortalDbProvider extends DbProvider {
Result queryUserByEmail(String email);
Result queryUserById(String id);
Result queryUserByWallet(String wallet);
Result queryEmailByWallet(String wallet);
Result createUser(UserCreatedEvent event);
Result confirmUser(UserConfirmedEvent event);
Result queryNonceByEmail(String email);
Result createSocialUser(SocialUserCreatedEvent event);
Result updateUser(UserUpdatedEvent event);
Result deleteUser(UserDeletedEvent event);
Result updateUserRoles(UserRolesUpdatedEvent event);
Result forgetPassword(PasswordForgotEvent event);
Result resetPassword(PasswordResetEvent event);
Result changePassword(PasswordChangedEvent event);
Result updatePayment(PaymentUpdatedEvent event);
Result deletePayment(PaymentDeletedEvent event);
Result createOrder(OrderCreatedEvent event);
Result cancelOrder(OrderCancelledEvent event);
Result deliverOrder(OrderDeliveredEvent event);
Result sendPrivateMessage(PrivateMessageSentEvent event);
Result createClient(MarketClientCreatedEvent event);
Result updateClient(MarketClientUpdatedEvent event);
Result deleteClient(MarketClientDeletedEvent event);
Result
© 2015 - 2025 Weber Informatics LLC | Privacy Policy