|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.softslate.commerce.businessobjects.core.BaseBusinessObject com.softslate.commerce.businessobjects.core.SettingsBean
Represents various settings used by the application, or a single setting.
Settings for the application are stored in the npcSetting
database table. The various settings represent everything from the default
colors and fonts used by the display templates, to the names of the Java
classes that implement various business object interfaces for the
application.
An instance of SettingsBean
is created in the Struts layer. It
is initialized there through initialize(DAOFactory)
,
which populates the map
property with the results of a
query on the npcSetting
table. For each setting, an entry in
the map
is created with the setting code used as the key and
its value as the key's value.
The SettingsBean
instance created in the Struts layer is
passed throughout the application to look up needed settings. The
application's BusinessObjectFactory
initializes each business
object with the SettingsBean
immediately after it creates it.
This class can also be used as an interface to the npcSetting
database table, in which case it respresents a single setting. It stores each
of that table's columns as properties to assist with inserts and updates.
Field Summary | |
(package private) int |
ALL
|
private java.lang.String |
code
The code for this SettingsBean , when used as an interface
to the npcSetting database table. |
private java.lang.String |
description
The description for this SettingsBean , when used as an
interface to the npcSetting database table. |
private int |
integerValue
The integerValue for this SettingsBean , when used as an
interface to the npcSetting database table. |
(package private) static org.apache.commons.logging.Log |
log
|
private java.util.Map |
map
The map of settings values for this SettingsBean . |
private java.lang.String |
mediumValue
The mediumValue for this SettingsBean , when used as an
interface to the npcSetting database table. |
private java.lang.String |
name
The name for this SettingsBean , when used as an interface
to the npcSetting database table. |
private static long |
serialVersionUID
|
private int |
settingID
The settingID for this SettingsBean , when used as an
interface to the npcSetting database table. |
private java.lang.String |
smallValue
The smallValue for this SettingsBean , when used as an
interface to the npcSetting database table. |
private java.lang.String |
textValue
The textValue for this SettingsBean , when used as an
interface to the npcSetting database table. |
private java.lang.String |
type
The type for this SettingsBean , when used as an interface
to the npcSetting database table. |
private java.lang.String |
valueType
The value type for this SettingsBean , when used as an
interface to the npcSetting database table. |
Constructor Summary | |
SettingsBean()
|
Method Summary | |
java.lang.String |
getCode()
|
java.lang.String |
getDescription()
|
int |
getIntegerValue()
|
java.util.Map |
getMap()
Retrieves the map of settings values for this SettingsBean . |
java.lang.String |
getMediumValue()
|
java.lang.String |
getName()
|
int |
getSettingID()
|
java.lang.String |
getSmallValue()
|
java.lang.String |
getTextValue()
|
java.lang.String |
getType()
|
java.lang.Object |
getValue(java.lang.String key)
Gets the value of a given key in this SettingsBean 's
map . |
java.lang.String |
getValueType()
|
void |
initialize(DAOFactory daoFactory)
Initializes this SettingsBean . |
void |
setCode(java.lang.String code)
|
void |
setDescription(java.lang.String description)
|
void |
setIntegerValue(int integerValue)
|
void |
setMap(java.util.Map map)
Sets the map of settings values for this SettingsBean . |
void |
setMediumValue(java.lang.String mediumValue)
|
void |
setName(java.lang.String name)
|
void |
setSettingID(int settingID)
|
void |
setSmallValue(java.lang.String smallValue)
|
void |
setTextValue(java.lang.String textValue)
|
void |
setType(java.lang.String type)
|
void |
setValue(java.lang.String key,
java.lang.Object value)
Sets the value of a given key in this SettingsBean 's
map . |
void |
setValueType(java.lang.String valueType)
|
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessObject |
formatDateTime, initialize, parseDateTime, prepareRequestData, sendHTTPPost |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
final int ALL
static org.apache.commons.logging.Log log
private java.util.Map map
SettingsBean
. The
keys of this Map
correspond to the code
field of the npcSetting
database table. The values
correspond to whichever value field (integerValue
,
smallValue
, mediumValue
, or
textValue
) is not null in npcSetting
.
private int settingID
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.settingID
.
private java.lang.String code
SettingsBean
, when used as an interface
to the npcSetting
database table. Corresponds to
npcSetting.code
.
private java.lang.String name
SettingsBean
, when used as an interface
to the npcSetting
database table. Corresponds to
npcSetting.name
.
private java.lang.String description
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.description
.
private java.lang.String type
SettingsBean
, when used as an interface
to the npcSetting
database table. Corresponds to
npcSetting.type
.
private java.lang.String valueType
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.valueType
.
private int integerValue
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.integerValue
.
private java.lang.String smallValue
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.smallValue
.
private java.lang.String mediumValue
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.mediumValue
.
private java.lang.String textValue
SettingsBean
, when used as an
interface to the npcSetting
database table. Corresponds to
npcSetting.textValue
.
Constructor Detail |
public SettingsBean()
Method Detail |
public java.util.Map getMap()
SettingsBean
.
The keys of this Map
correspond to the code
field of the npcSetting
database table. The values
correspond to whichever value field (integerValue
,
smallValue
, mediumValue
, or
textValue
) is not null in npcSetting
.
SettingsBean
.public void setMap(java.util.Map map)
SettingsBean
.
The keys of this Map
correspond to the code
field of the npcSetting
database table. The values
correspond to whichever value field (integerValue
,
smallValue
, mediumValue
, or
textValue
) is not null in npcSetting
.
SettingsBean
.public int getSettingID()
public void setSettingID(int settingID)
public java.lang.String getCode()
public void setCode(java.lang.String code)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
public java.lang.String getType()
public void setType(java.lang.String type)
public java.lang.String getValueType()
public void setValueType(java.lang.String valueType)
public int getIntegerValue()
public void setIntegerValue(int integerValue)
public java.lang.String getSmallValue()
public void setSmallValue(java.lang.String smallValue)
public java.lang.String getMediumValue()
public void setMediumValue(java.lang.String mediumValue)
public java.lang.String getTextValue()
public void setTextValue(java.lang.String textValue)
public void setValue(java.lang.String key, java.lang.Object value)
SettingsBean
's
map
.
key
- The key whose value is being setvalue
- The value.
java.lang.Exception
public java.lang.Object getValue(java.lang.String key)
SettingsBean
's
map
.
key
- The key whose value is to be retrieved.
java.lang.Exception
public void initialize(DAOFactory daoFactory) throws java.lang.Exception
SettingsBean
. Populates the map
property with the results of a query on the npcSetting
database table.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |