Rev | Line | |
---|
[1240] | 1 | package gov.va.med.edp.vistalink;
|
---|
| 2 |
|
---|
| 3 | import org.springframework.dao.support.DaoSupport;
|
---|
| 4 | import gov.va.med.edp.vistalink.locator.InstitutionMappingConnectionFactoryLocator;
|
---|
| 5 |
|
---|
| 6 | public class VistaLinkDaoSupport extends DaoSupport {
|
---|
| 7 |
|
---|
| 8 | private VistaLinkTemplate rpcTemplate;
|
---|
| 9 |
|
---|
| 10 | protected void checkDaoConfig() throws IllegalArgumentException {
|
---|
| 11 | if (this.rpcTemplate == null) {
|
---|
| 12 | setConnectionFactoryLocator(new InstitutionMappingConnectionFactoryLocator());
|
---|
| 13 | }
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | protected VistaLinkTemplate createRpcTemplate(ConnectionFactoryLocator connectionFactoryLocator) {
|
---|
| 17 | return new VistaLinkTemplate(connectionFactoryLocator);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public ConnectionFactoryLocator getConnectionFactoryLocator() {
|
---|
| 21 | return rpcTemplate.getConnectionFactoryLocator();
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | public void setConnectionFactoryLocator(ConnectionFactoryLocator connectionFactoryLocator) {
|
---|
| 25 | setRpcTemplate(createRpcTemplate(connectionFactoryLocator));
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | public VistaLinkTemplate getRpcTemplate() {
|
---|
| 29 | return rpcTemplate;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | public void setRpcTemplate(VistaLinkTemplate rpcTemplate) {
|
---|
| 33 | this.rpcTemplate = rpcTemplate;
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.