source: EDIS/tags/ed/tracking-server-vista/src/main/java/gov/va/med/edp/vistalink/VistaLinkDaoSupport.java@ 1240

Last change on this file since 1240 was 1240, checked in by George Lilly, 13 years ago

new version from the VA

File size: 1.2 KB
Line 
1package gov.va.med.edp.vistalink;
2
3import org.springframework.dao.support.DaoSupport;
4import gov.va.med.edp.vistalink.locator.InstitutionMappingConnectionFactoryLocator;
5
6public 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.