Class GetLoginData

java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.GetLoginData

public class GetLoginData extends DAO
A Data Access Object to load Login IP address data.
Since:
1.0
Version:
11.0
Author:
Luke
  • Constructor Details

    • GetLoginData

      public GetLoginData(Connection c)
      Initializes the Data Access Object.
      Parameters:
      c - the JDBC connection to use
  • Method Details

    • getAddresses

      public Collection<LoginAddress> getAddresses(int id) throws DAOException
      Returns all login addresses for a particular User.
      Parameters:
      id - the user's database ID
      Returns:
      a Collection of LoginAddress beans
      Throws:
      DAOException - if a JDBC error occurs
    • getAddresses

      public Collection<LoginAddress> getAddresses(String hostName) throws DAOException
      Returns all login addresses for a particular host name. Wilcard search is supported.
      Parameters:
      hostName - the host name
      Returns:
      a Collection of LoginAddress beans
      Throws:
      DAOException - if a JDBC error occurs
    • getLoginUsers

      public Collection<LoginAddress> getLoginUsers(String host) throws DAOException
      Searches for all user logins by a particular host name or portion thereof.
      Parameters:
      host - the host name
      Returns:
      a Collection of LoginAddress beans
      Throws:
      DAOException - if a JDBC error occurs
    • getLoginUsers

      public Collection<LoginAddress> getLoginUsers(String address, IPBlock addrBlock) throws DAOException
      Searches for all user logins within a particular IP network.
      Parameters:
      address - the IP address
      addrBlock - the address network block
      Returns:
      a Collection of LoginAddress beans
      Throws:
      DAOException - if a JDBC error occurs