All Packages Class Hierarchy This Package Previous Next Index
Class tc.database.UsernameAndPasswordQuery
java.lang.Object
|
+----tc.database.DatabaseQuery
|
+----tc.database.UsernameAndPasswordQuery
- public class UsernameAndPasswordQuery
- extends DatabaseQuery
UserNameAndPasswordQuery
implements the abstract methods in
DatabaseQuery so that calling them causes user name and password check.
- Version:
- 0.30, 1998/04/01
- Author:
- FRED development team, Antti Viljamaa
-
UsernameAndPasswordQuery(byte[])
- Creates a new query.
-
calculate(QueryDataSet)
- Finalizes the query by checking the username/ password combination.
-
comparePasswords(byte[], byte[])
- Compares two passwords and returns
true
if they match and
false
if they don't match.
-
getSQLClause()
- Returns the SQL query for creating the needed dataset.
-
isWriteQuery()
- Returns
false
.
UsernameAndPasswordQuery
public UsernameAndPasswordQuery(byte passwd[])
- Creates a new query. Password is given as a parameter. (User name is asked
from the database manager.)
calculate
public void calculate(QueryDataSet dataset) throws DataSetException, ValidationException
- Finalizes the query by checking the username/ password combination.
- Overrides:
- calculate in class DatabaseQuery
getSQLClause
public String getSQLClause()
- Returns the SQL query for creating the needed dataset.
- Returns:
- String A string representing the query.
- Overrides:
- getSQLClause in class DatabaseQuery
isWriteQuery
public boolean isWriteQuery()
- Returns
false
.
- Returns:
-
false
- Overrides:
- isWriteQuery in class DatabaseQuery
comparePasswords
private boolean comparePasswords(byte passwd1[],
byte passwd2[])
- Compares two passwords and returns
true
if they match and
false
if they don't match.
- Parameters:
- passwd1 - Password.
- passwd2 - Password.
- Returns:
-
true
if the given passwords match,
false
otherwise.
All Packages Class Hierarchy This Package Previous Next Index