Class MysqlUserLoader

java.lang.Object
crow.game.omnisrv.MysqlUserLoader
All Implemented Interfaces:
UserLoader

public class MysqlUserLoader extends Object implements UserLoader
A UserLoader implementation which reads from the mysql db using the rathena schema via the mybatis xml file
  • Constructor Details

    • MysqlUserLoader

      public MysqlUserLoader(org.apache.ibatis.session.SqlSessionFactory db)
  • Method Details

    • loadUser

      public Optional<User> loadUser(String username) throws Exception
      Description copied from interface: UserLoader
      Load a user.
      Specified by:
      loadUser in interface UserLoader
      Parameters:
      username - The username
      Returns:
      The user, if found, otherwise an empty Optional object.
      Throws:
      Exception - if there is a non-missing user error loading the user.
    • loadUserByID

      public Optional<User> loadUserByID(Object id) throws Exception
      Description copied from interface: UserLoader
      Load a user by its account ID
      Specified by:
      loadUserByID in interface UserLoader
      Parameters:
      id - The identifier to use.
      Returns:
      The user, if found, otherwise an empty Optional object.
      Throws:
      Exception - if there is a non-missing user error loading the user.