org.openstreetmap.osmosis.core.database
Class DatabasePreferences

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

public class DatabasePreferences
extends java.lang.Object

Stores parameters that can be used to configure database behaviour.

Author:
Brett Henderson

Constructor Summary
DatabasePreferences(boolean validateSchemaVersion, boolean allowIncorrectSchemaVersion)
          Creates a new instance.
 
Method Summary
 boolean getAllowIncorrectSchemaVersion()
          Returns the allowIncorrectSchemaVersion flag.
 boolean getValidateSchemaVersion()
          Returns the validateSchemaVersion flag.
 void setAllowIncorrectSchemaVersion(boolean allowIncorrectSchemaVersion)
          Updates the allowIncorrectSchemaVersion flag.
 void setValidateSchemaVersion(boolean validateSchemaVersion)
          Updates the validateSchemaVersion flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabasePreferences

public DatabasePreferences(boolean validateSchemaVersion,
                           boolean allowIncorrectSchemaVersion)
Creates a new instance.

Parameters:
validateSchemaVersion - Specifies whether a schema version check should be performed.
allowIncorrectSchemaVersion - Defines behaviour on an incorrect schema version. If true, a warning will be logged. If false, execution will abort.
Method Detail

getValidateSchemaVersion

public boolean getValidateSchemaVersion()
Returns the validateSchemaVersion flag.

Returns:
The validateSchemaVersion value.

setValidateSchemaVersion

public void setValidateSchemaVersion(boolean validateSchemaVersion)
Updates the validateSchemaVersion flag.

Parameters:
validateSchemaVersion - The new validateSchemaVersion value.

getAllowIncorrectSchemaVersion

public boolean getAllowIncorrectSchemaVersion()
Returns the allowIncorrectSchemaVersion flag.

Returns:
The allowIncorrectSchemaVersion value.

setAllowIncorrectSchemaVersion

public void setAllowIncorrectSchemaVersion(boolean allowIncorrectSchemaVersion)
Updates the allowIncorrectSchemaVersion flag.

Parameters:
allowIncorrectSchemaVersion - The new allowIncorrectSchemaVersion value.