org.jaffa.persistence.engines.jdbcengine.variants
Class Variant

java.lang.Object
  extended byorg.jaffa.persistence.engines.jdbcengine.variants.Variant

public class Variant
extends Object

This class manages all the access to the properties of the various database variants. Each database variant will have its own property file in this package. For eg. a variant 'xxx' will have a 'xxx.properties' file in this package. If the file does not exist, or if a particular property does not exist in the variant, then the 'default.properties' will be used. Each property will have a static name associated with it.

Version:
1.0
Author:
GautamJ

Field Summary
static String PROP_DEFAULT_PACKING_CODE_FOR_BOOLEAN
          Static : This is used to get the default packing code for boolean fields in a DBMS.
static String PROP_LOCK_CONSTRUCT_IN_FROM_SELECT_STATEMENT
          Static : The LOCK construct in the fROM portion if a SELECT statement
static String PROP_LOCK_CONSTRUCT_IN_SELECT_STATEMENT
          Static : The LOCK construct in a SELECT statement
static String PROP_USE_TO_DATE_SQL_FUNCTION
          Static : This indicates if the to_date SQL function is used when querying Date fields
 
Constructor Summary
Variant()
           
 
Method Summary
static String getProperty(String variant, String key)
          Returns the value of a property, for a given variant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_LOCK_CONSTRUCT_IN_SELECT_STATEMENT

public static final String PROP_LOCK_CONSTRUCT_IN_SELECT_STATEMENT
Static : The LOCK construct in a SELECT statement

See Also:
Constant Field Values

PROP_LOCK_CONSTRUCT_IN_FROM_SELECT_STATEMENT

public static final String PROP_LOCK_CONSTRUCT_IN_FROM_SELECT_STATEMENT
Static : The LOCK construct in the fROM portion if a SELECT statement

See Also:
Constant Field Values

PROP_USE_TO_DATE_SQL_FUNCTION

public static final String PROP_USE_TO_DATE_SQL_FUNCTION
Static : This indicates if the to_date SQL function is used when querying Date fields

See Also:
Constant Field Values

PROP_DEFAULT_PACKING_CODE_FOR_BOOLEAN

public static final String PROP_DEFAULT_PACKING_CODE_FOR_BOOLEAN
Static : This is used to get the default packing code for boolean fields in a DBMS. Can be one of BOOLEAN_BIT, BOOLEAN_TF, BOOLEAN_YN, BOOLEAN_10

See Also:
Constant Field Values
Constructor Detail

Variant

public Variant()
Method Detail

getProperty

public static String getProperty(String variant,
                                 String key)
                          throws MissingResourceException
Returns the value of a property, for a given variant. The default resource will be used, in case the variant resource is not found or if the variant does not have the given property.

Parameters:
variant - the name of the variant. If a null value is passed, then the default will be used.
key - the name of the property.
Returns:
the value of a property.
Throws:
MissingResourceException - if the property is not found in both the variant and the default resource files.


Copyright © 2002-2004 JAFFA Project.