Package marauroa.server.game.db
Class LoginEventDAO.LoginEvent
java.lang.Object
marauroa.server.game.db.LoginEventDAO.LoginEvent
- Enclosing class:
- LoginEventDAO
Class to store the login events
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLoginEvent(long id, long playerId, String service, String address, String date, boolean sucessful)
Creates a new LoginEvent objectLoginEvent(String address, String date, boolean sucessful)
Creates a new LoginEvent object -
Method Summary
Modifier and TypeMethodDescriptiongets the ip-addressgetDate()
gets the timestamp of the login attemptlong
getId()
gets the id of this database rowlong
gets the id of the accountgets the name of the serviceboolean
was this a successful login attempt?toString()
This method returns a String that represent the object.
-
Field Details
-
address
TCP/IP address of the source of the login message -
date
Time and date of the login event -
correct
public boolean correctTrue if login was correct
-
-
Constructor Details
-
LoginEvent
Creates a new LoginEvent object- Parameters:
address
- the address from where the login was trieddate
- the date at which login was triedsucessful
- 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 idplayerId
- database id of accountservice
- name of serviceaddress
- the address from where the login was trieddate
- the date at which login was triedsucessful
- true, if the attempt was successful; false otherwise
-
-
Method Details
-
toString
This method returns a String that represent 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
gets the name of the service- Returns:
- id or
null
-
getAddress
gets the ip-address- Returns:
- ip-address
-
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
-