Class GetPilotDirectory
java.lang.Object
org.deltava.dao.DAO
org.deltava.dao.PilotReadDAO
org.deltava.dao.GetPilot
org.deltava.dao.GetPilotDirectory
- All Implemented Interfaces:
PersonUniquenessDAO
A Data Access Object to obtain user Directory information for Pilots.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.dao.PilotReadDAO
_cache
Fields inherited from class org.deltava.dao.DAO
_queryMax, _queryStart, _queryTimeout, WGS84_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckSoundex
(Person usr, String dbName) Performs a soundex search on a Person's last name to detect possible matches.checkUnique
(Person p, String dbName) Checks if a Person is unique, by checking the first/last names and the e-mail address.checkUnique
(Person p, String dbName, int days) Checks if a Person is unique, by checking the first/last names and the e-mail address.checkUniqueEMail
(Person usr, String dbName) Checks whether a particular e-mail address is unique.Returns the Pilot with a particular Pilot Code.getByIMAddress
(String addr) Returns users from the current database based on their Instant Message address.Returns all active Pilots who have a particular security role.Returns all Pilots who have a particular security role.Returns all Pilots with permanent accounts.Methods inherited from class org.deltava.dao.GetPilot
getActivePilots, getByEMail, getCurrencyPilots, getNewestPilots, getPilotByCode, getPilots, getPilotsByEQ, getPilotsByLetter, getPilotsByRank, getPilotsByStatus, search, search
Methods inherited from class org.deltava.dao.PilotReadDAO
execute, get, get, get, getByID, getByName, loadAccomplishments, loadChildRows, loadIMAddrs, loadPushEndpoints, loadRatings, loadRoles, updatePilotCodes
Methods inherited from class org.deltava.dao.DAO
commitTransaction, createTimestamp, executeIDs, executeUpdate, executeUpdate, expandDate, formatDBName, formatLocation, getNewID, getQueryCount, prepare, prepareWithoutLimits, rollbackTransaction, setQueryMax, setQueryStart, setQueryTimeout, startTransaction, toID, toID, toInstant
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.dao.PersonUniquenessDAO
get
-
Constructor Details
-
GetPilotDirectory
Initialize the Data Access Object.- Parameters:
c
- the JDBC connection to use
-
-
Method Details
-
getByCode
Returns the Pilot with a particular Pilot Code.- Parameters:
pilotCode
- the Pilot Code (eg DVA043)- Returns:
- the Directory Name of the Pilot, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
checkUnique
Checks if a Person is unique, by checking the first/last names and the e-mail address.- Specified by:
checkUnique
in interfacePersonUniquenessDAO
- Parameters:
p
- the PersondbName
- the database to search- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
checkUnique
Checks if a Person is unique, by checking the first/last names and the e-mail address.- Specified by:
checkUnique
in interfacePersonUniquenessDAO
- Parameters:
p
- the PersondbName
- the database to searchdays
- restrict uniqueness search to users created in the last number of days, or -1 for all- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
checkUniqueEMail
Checks whether a particular e-mail address is unique.- Parameters:
usr
- the Person to check fordbName
- the database to check- Returns:
- a Collection of database IDs
- Throws:
DAOException
- if a JDBC error occurs
-
getByIMAddress
Returns users from the current database based on their Instant Message address.- Parameters:
addr
- the address- Returns:
- a Pilot, or null if not found
- Throws:
DAOException
- if a JDBC error occurs
-
getPermanent
Returns all Pilots with permanent accounts.- Returns:
- a Collection of Pilots
- Throws:
DAOException
- if a JDBC error occurs
-
getByRole
Returns all active Pilots who have a particular security role.- Parameters:
roleName
- the role namedbName
- the database name- Returns:
- a List of Pilots
- Throws:
DAOException
- if a JDBC error occurs
-
getByRole
public List<Pilot> getByRole(String roleName, String dbName, boolean activeOnly) throws DAOException Returns all Pilots who have a particular security role.- Parameters:
roleName
- the role namedbName
- the database nameactiveOnly
- TRUE to only include active Pilots, otherwise FALSE- Returns:
- a List of Pilots
- Throws:
DAOException
- if a JDBC error occurs
-
checkSoundex
Performs a soundex search on a Person's last name to detect possible matches. The soundex implementation is dependent on the capabilities of the underlying database engine, and is not guaranteed to be consistent (or even supported) across different database servers.- Specified by:
checkSoundex
in interfacePersonUniquenessDAO
- Parameters:
usr
- the Person to check fordbName
- the database name- Returns:
- a Collection of Database IDs as Integers
- Throws:
DAOException
- if a JDBC error occurs
-