Class LoginAddress
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.LoginAddress
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,IDBean
,RemoteAddressBean
,Cacheable
A bean to store Login address information for a user.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of logins by this user from this address.Returns the remote IP address.Returns the remote host name.void
setLoginCount
(int logins) Updates the number of logins by this user from this address.void
setRemoteAddr
(String addr) Updates the IP address used to log in.void
setRemoteHost
(String host) Updates the host name used to log in.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.RemoteAddressBean
getIsResolved
-
Constructor Details
-
LoginAddress
public LoginAddress(int id) Initializes the bean.- Parameters:
id
- the database ID of the user
-
-
Method Details
-
getRemoteAddr
Description copied from interface:RemoteAddressBean
Returns the remote IP address.- Specified by:
getRemoteAddr
in interfaceRemoteAddressBean
- Returns:
- an IPv4 or IPv6 address
-
getRemoteHost
Description copied from interface:RemoteAddressBean
Returns the remote host name.- Specified by:
getRemoteHost
in interfaceRemoteAddressBean
- Returns:
- the host name, or address if unresolved
-
getLoginCount
public int getLoginCount()Returns the number of logins by this user from this address.- Returns:
- the number of logins
- See Also:
-
setRemoteAddr
Updates the IP address used to log in.- Parameters:
addr
- the IP address- See Also:
-
setRemoteHost
Updates the host name used to log in.- Parameters:
host
- the host name- See Also:
-
setLoginCount
public void setLoginCount(int logins) Updates the number of logins by this user from this address.- Parameters:
logins
- the number of logins- Throws:
IllegalArgumentException
- if logins is negative- See Also:
-