Project

General

Profile

« Previous | Next » 

Revision 4335

Added by daigle over 15 years ago

Move the DBAdaptor accessor into a DatabaseService class

View differences:

DBSAXNode.java
27 27
package edu.ucsb.nceas.metacat;
28 28

  
29 29
import java.sql.*;
30
import java.io.IOException;
31 30
import java.util.Hashtable;
32 31
import java.util.Enumeration;
33
//import oracle.jdbc.driver.*;
34 32
import org.apache.log4j.Logger;
35 33
import org.xml.sax.SAXException;
36 34

  
37
import edu.ucsb.nceas.dbadapter.AbstractDatabase;
38
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
35
import edu.ucsb.nceas.metacat.service.DatabaseService;
39 36

  
40 37
/**
41 38
 * A Class that represents an XML node and its contents and
......
45 42

  
46 43
  private DBConnection	connection;
47 44
  private DBSAXNode	parentNode;
48
  private static final AbstractDatabase dbAdapter = MetaCatUtil.dbAdapter;
49 45
  private Logger logMetacat = Logger.getLogger(DBSAXNode.class);
50 46

  
51 47
  /**
......
207 203
      pstmt.close();
208 204

  
209 205
      // get the generated unique id afterward
210
      nid = dbAdapter.getUniqueID(connection.getConnections(), "xml_nodes");
206
      nid = DatabaseService.getDBAdapter().getUniqueID(connection.getConnections(), "xml_nodes");
211 207
      //should incease connection usage!!!!!!
212 208

  
213 209

  
......
339 335
      pstmt.close();
340 336

  
341 337
      // get the generated unique id afterward
342
      nid = dbAdapter.getUniqueID(connection.getConnections(), "xml_nodes");
338
      nid = DatabaseService.getDBAdapter().getUniqueID(connection.getConnections(), "xml_nodes");
343 339
      //should incease connection usage!!!!!!
344 340

  
345 341
    } catch (SQLException e) {

Also available in: Unified diff