Class LoginEventDAO.LoginEvent

java.lang.Object
marauroa.server.game.db.LoginEventDAO.LoginEvent
Enclosing class:
LoginEventDAO

public static class LoginEventDAO.LoginEvent extends Object
Class to store the login events
  • Field Details

    • address

      public String address
      TCP/IP address of the source of the login message
    • date

      public String date
      Time and date of the login event
    • correct

      public boolean correct
      True if login was correct
  • Constructor Details

    • LoginEvent

      public LoginEvent(String address, String date, boolean sucessful)
      Creates a new LoginEvent object
      Parameters:
      address - the address from where the login was tried
      date - the date at which login was tried
      sucessful - true if login was sucessful
    • LoginEvent

      public LoginEvent(long id, long playerId, String service, String address, String date, boolean sucessful)
      Creates a new LoginEvent object
      Parameters:
      id - database id
      playerId - database id of account
      service - name of service
      address - the address from where the login was tried
      date - the date at which login was tried
      sucessful - true, if the attempt was successful; false otherwise
  • Method Details

    • toString

      public String toString()
      This method returns a String that represent the object.
      Overrides:
      toString in class Object
      Returns:
      a string representing the object.
    • getId

      public long getId()
      gets the id of this database row
      Returns:
      id or -1
    • getPlayerId

      public long getPlayerId()
      gets the id of the account
      Returns:
      player_id or -1
    • getService

      public String getService()
      gets the name of the service
      Returns:
      id or null
    • getAddress

      public String getAddress()
      gets the ip-address
      Returns:
      ip-address
    • getDate

      public String getDate()
      gets the timestamp of the login attempt
      Returns:
      timestamp
    • isSuccessful

      public boolean isSuccessful()
      was this a successful login attempt?
      Returns:
      true, if the attempt was successful; false otherwise