com.redstarhackers.dal
Interface DataAccessStrategy

All Superinterfaces:
DataAccessLayer

public interface DataAccessStrategy
extends DataAccessLayer

Data Access Strategy, defining how a specific DAL implementation hooks into other resources in the DAL framework.

Version:
$Revision: 1092 $
Author:
$Author: kostya $

Field Summary
static java.lang.String APP_NAME_KEY
           
static java.lang.String DATA_STORE_ID_KEY
           
static java.lang.String DEFAULT_DATA_STORE_ID
           
static java.lang.String NAME_KEY
           
 
Method Summary
 java.lang.String getDataStoreId()
          Get the datastore id used by this strategy.
 java.lang.String getName()
          The name of this strategy, uniquely identifying it within the DAL framework.
 java.lang.Object getSetting(java.lang.Object key)
          Get the setting value used by this strategy instance.
 java.util.Map getSettings()
          Get the settings used by this strategy instance.
 void setDataStoreId(java.lang.String id)
          Set the datasource id used by this strategy.
 void setName(java.lang.String name)
          The name of this strategy, uniquely identifying it within the DAL framework.
 void setSetting(java.lang.Object key, java.lang.Object value)
          Set the setting value used by this strategy, replacing any previous setting value.
 void setSettings(java.util.Map newSettings)
          Set the settings used by this strategy, replacing any previous setting values.
 
Methods inherited from interface com.redstarhackers.dal.DataAccessLayer
addModel, executeNamedQuery, executeNamedQuery, executeNamedQuery, executeNamedQuery, executeNamedStatement, executeNamedStatement, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeStatement, executeStatement, getNamedQuery, getNamedStatement, loadModel, removeModel, removeModel, updateModel, updateModel
 

Field Detail

DEFAULT_DATA_STORE_ID

public static final java.lang.String DEFAULT_DATA_STORE_ID
See Also:
Constant Field Values

NAME_KEY

public static final java.lang.String NAME_KEY
See Also:
Constant Field Values

DATA_STORE_ID_KEY

public static final java.lang.String DATA_STORE_ID_KEY
See Also:
Constant Field Values

APP_NAME_KEY

public static final java.lang.String APP_NAME_KEY
See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
The name of this strategy, uniquely identifying it within the DAL framework.

Returns:
the unique name of this strategy instance.

setName

public void setName(java.lang.String name)
The name of this strategy, uniquely identifying it within the DAL framework.

Returns:
the unique name of this strategy instance.

getSettings

public java.util.Map getSettings()
Get the settings used by this strategy instance.

Returns:
the settings

setSettings

public void setSettings(java.util.Map newSettings)
Set the settings used by this strategy, replacing any previous setting values.

Parameters:
newSettings - the new settings

getSetting

public java.lang.Object getSetting(java.lang.Object key)
Get the setting value used by this strategy instance.

Returns:
the setting value (can be null)

setSetting

public void setSetting(java.lang.Object key,
                       java.lang.Object value)
Set the setting value used by this strategy, replacing any previous setting value.

Parameters:
key - the key for this setting
value - the value of this setting

getDataStoreId

public java.lang.String getDataStoreId()
Get the datastore id used by this strategy. The datastore id corresponds to the data store to be used for the data operations of this instance. By setting the datastore id, you can point a strategy at a different database or datastore instead of the default for the application.

Returns:
the datasource id, which refers to a specific database or data store to use for the data operations of this instance.

setDataStoreId

public void setDataStoreId(java.lang.String id)
Set the datasource id used by this strategy. The datastore id corresponds to the data store to be used for the data operations of this instance. By setting the datastore id, you can point a strategy at a different database or datastore instead of the default for the application.

Parameters:
id - the datastore id, which refers to a specific database or data store to use for the data operations of this instance.