Class NetworkUser
java.lang.Object
org.deltava.beans.servinfo.NetworkUser
- All Implemented Interfaces:
Serializable
,Comparable<NetworkUser>
,ViewEntry
- Direct Known Subclasses:
ConnectedUser
,PilotRating
public abstract class NetworkUser
extends Object
implements Serializable, ViewEntry, Comparable<NetworkUser>
A bean to store Online Network user information.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNetworkUser
(int id, OnlineNetwork net) Initializes the bean with a given network ID. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(NetworkUser usr2) boolean
Returns the user's first name.int
getID()
Returns the user's network ID.Returns the user's last name.getName()
Returns the user's full name.Returns the Online Network for this user.int
Returns the Database ID of this network user.Returns the Controller's rating.Returns the CSS class for this object if rendered in a view table.abstract NetworkUser.Type
getType()
Returns the user type.int
hashCode()
void
setFirstName
(String fName) Updates the user's first name.void
setLastName
(String lName) Updates the user's last name.void
Updates the network user's name, stripping off the home airport.void
setPilotID
(int id) Updates the database ID of this User.void
Sets the Users's rating.toString()
-
Constructor Details
-
NetworkUser
Initializes the bean with a given network ID.- Parameters:
id
- the user IDnet
- the OnlineNetwork
-
-
Method Details
-
getType
-
getPilotID
public int getPilotID()Returns the Database ID of this network user.- Returns:
- the database ID, or 0 if this user is not a member
- See Also:
-
getID
public int getID()Returns the user's network ID.- Returns:
- the network ID
-
getNetwork
Returns the Online Network for this user.- Returns:
- an OnlineNetwork, or null if unknown
-
getName
-
getFirstName
-
getLastName
-
getRating
-
setPilotID
public void setPilotID(int id) Updates the database ID of this User.- Parameters:
id
- the database ID, or 0 if this network user is not a member- See Also:
-
setFirstName
Updates the user's first name.- Parameters:
fName
- the first name- Throws:
NullPointerException
- if fName is null- See Also:
-
setLastName
Updates the user's last name.- Parameters:
lName
- the last name- Throws:
NullPointerException
- if lName is null- See Also:
-
setName
Updates the network user's name, stripping off the home airport.- Parameters:
name
- the user name- See Also:
-
setRating
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NetworkUser>
-
toString
-
equals
-
hashCode
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-