org.openstreetmap.osmosis.core.database
Class DatabaseLoginCredentials

java.lang.Object
  extended by org.openstreetmap.osmosis.core.database.DatabaseLoginCredentials

public class DatabaseLoginCredentials
extends java.lang.Object

Stores all information required to connect to a database.

Author:
Brett Henderson

Constructor Summary
DatabaseLoginCredentials(java.lang.String host, java.lang.String database, java.lang.String user, java.lang.String password, boolean forceUtf8, boolean profileSql, DatabaseType dbType)
          Creates a new instance.
 
Method Summary
 java.lang.String getDatabase()
          Returns the database.
 DatabaseType getDbType()
          Return database type.
 boolean getForceUtf8()
          Returns the force utf-8 flag.
 java.lang.String getHost()
          Returns the host.
 java.lang.String getPassword()
          Returns the password.
 boolean getProfileSql()
          Returns the profile SQL flag.
 java.lang.String getUser()
          Returns the user.
 void setDatabase(java.lang.String database)
          Updates the database.
 void setDbType(DatabaseType dbType)
          Updates database type.
 void setDbType(java.lang.String property)
          Updates the database type.
 void setForceUtf8(boolean forceUtf8)
          Updates the force utf-8 flag.
 void setHost(java.lang.String host)
          Updates the host.
 void setPassword(java.lang.String password)
          Updates the password.
 void setProfileSql(boolean profileSql)
          Updates the profile SQL flag.
 void setUser(java.lang.String user)
          Updates the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseLoginCredentials

public DatabaseLoginCredentials(java.lang.String host,
                                java.lang.String database,
                                java.lang.String user,
                                java.lang.String password,
                                boolean forceUtf8,
                                boolean profileSql,
                                DatabaseType dbType)
Creates a new instance.

Parameters:
host - The server hosting the database.
database - The database instance.
user - The user name for authentication.
password - The password for authentication.
forceUtf8 - If true, the database connection will be forced to use utf-8 instead of the database default.
profileSql - If true, profile logging will be enabled on the database connection causing all queries to be logged to stderr.
dbType - The database type.
Method Detail

getHost

public java.lang.String getHost()
Returns the host.

Returns:
The host.

setHost

public void setHost(java.lang.String host)
Updates the host.

Parameters:
host - The new host.

getDatabase

public java.lang.String getDatabase()
Returns the database.

Returns:
The database.

setDatabase

public void setDatabase(java.lang.String database)
Updates the database.

Parameters:
database - The new database.

getUser

public java.lang.String getUser()
Returns the user.

Returns:
The user.

setUser

public void setUser(java.lang.String user)
Updates the user.

Parameters:
user - The new user.

getPassword

public java.lang.String getPassword()
Returns the password.

Returns:
The password.

setPassword

public void setPassword(java.lang.String password)
Updates the password.

Parameters:
password - The new password.

getForceUtf8

public boolean getForceUtf8()
Returns the force utf-8 flag.

Returns:
The force utf-8 flag.

setForceUtf8

public void setForceUtf8(boolean forceUtf8)
Updates the force utf-8 flag.

Parameters:
forceUtf8 - The new force utf-8 flag.

getProfileSql

public boolean getProfileSql()
Returns the profile SQL flag.

Returns:
The profile SQL flag.

setProfileSql

public void setProfileSql(boolean profileSql)
Updates the profile SQL flag.

Parameters:
profileSql - The new profile SQL flag.

getDbType

public DatabaseType getDbType()
Return database type.

Returns:
database type

setDbType

public void setDbType(DatabaseType dbType)
Updates database type.

Parameters:
dbType - database type

setDbType

public void setDbType(java.lang.String property)
Updates the database type.

Parameters:
property - The database type property.