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:
  • Constructor Details

    • NetworkUser

      public NetworkUser(int id, OnlineNetwork net)
      Initializes the bean with a given network ID.
      Parameters:
      id - the user ID
      net - the OnlineNetwork
  • Method Details

    • getType

      public abstract NetworkUser.Type getType()
      Returns the user type.
      Returns:
      the Type
    • 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

      public OnlineNetwork getNetwork()
      Returns the Online Network for this user.
      Returns:
      an OnlineNetwork, or null if unknown
    • getName

      public String getName()
      Returns the user's full name.
      Returns:
      the user's name
      See Also:
    • getFirstName

      public String getFirstName()
      Returns the user's first name.
      Returns:
      the first name
      See Also:
    • getLastName

      public String getLastName()
      Returns the user's last name.
      Returns:
      the last name
      See Also:
    • getRating

      public Rating getRating()
      Returns the Controller's rating.
      Returns:
      the Rating
      See Also:
    • 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

      public void setFirstName(String fName)
      Updates the user's first name.
      Parameters:
      fName - the first name
      Throws:
      NullPointerException - if fName is null
      See Also:
    • setLastName

      public void setLastName(String lName)
      Updates the user's last name.
      Parameters:
      lName - the last name
      Throws:
      NullPointerException - if lName is null
      See Also:
    • setName

      public void setName(String name)
      Updates the network user's name, stripping off the home airport.
      Parameters:
      name - the user name
      See Also:
    • setRating

      public void setRating(Rating r)
      Sets the Users's rating.
      Parameters:
      r - the Rating
      See Also:
    • compareTo

      public int compareTo(NetworkUser usr2)
      Specified by:
      compareTo in interface Comparable<NetworkUser>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o2)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name, or NULL if none