|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.terasoluna.fw.web.struts.action.MessageResourcesDAOImpl
public class MessageResourcesDAOImpl
MessageResourcesDAO implementation class.
When DBMessageResourcesFactory is used as the message resource factory class,
DBMessageResources use the class in which MessageResourcesDAO is implemented.
For details, refer to DBMessageResources
.
<bean id="sampleDataSource"
class="org.springframework.jndi.JndiObjectFactoryBean"
abstract="false" scope="singleton"
lazy-init="default"
autowire="default"
dependency-check="default">
<property name="jndiName"
value="sampleJndiDataSource" />
</bean>
Please note that the attribute of each element differs depending on the system.
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>oracle.jdbc.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@192.0.34.166:1521:ORCL</value>
</property>
<property name="username"><value>username</value></property>
<property name="password"><value>password</value></property>
</bean>
Please note that the following items from the above-mentioned settings differ depending on the system.
Field Summary | |
---|---|
static java.lang.String |
BEANS_XML
Bean definition file in which data source is defined. |
private static java.lang.String |
DATASOURCE_BEAN_ID
id value at the time of fetching data source bean. |
private static org.apache.commons.logging.Log |
log
Log class. |
private static java.lang.String |
MESSAGE_RESOURCES_DAO_IMPL_ERROR
Error code indicating the failure in fetching the data source. |
Constructor Summary | |
---|---|
MessageResourcesDAOImpl()
|
Method Summary | |
---|---|
protected java.lang.String |
getBeansXml()
Fetches the Bean definition file name in which data source is defined. |
java.util.Map<java.lang.String,java.lang.String> |
queryMessageMap(java.lang.String sql)
Fetches message resource. Returns the Map in which the first column of SQL is set as a key and second column is set as a value of Map. Returns the map with any one of the duplicate values when there is a duplication in the first column of result set returned by SQL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BEANS_XML
private static final java.lang.String DATASOURCE_BEAN_ID
private static final java.lang.String MESSAGE_RESOURCES_DAO_IMPL_ERROR
private static org.apache.commons.logging.Log log
Constructor Detail |
---|
public MessageResourcesDAOImpl()
Method Detail |
---|
public java.util.Map<java.lang.String,java.lang.String> queryMessageMap(java.lang.String sql)
queryMessageMap
in interface MessageResourcesDAO
sql
- SQL that fetches the message resource
protected java.lang.String getBeansXml()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |