Desktop tool for browsing account info from EVE-Online
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ApiFactory.java 737B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package uk.co.md87.evetool;
  6. import java.sql.Connection;
  7. import java.sql.DriverManager;
  8. import java.sql.SQLException;
  9. import uk.co.md87.evetool.api.EveApi;
  10. /**
  11. *
  12. * @author chris
  13. */
  14. public class ApiFactory {
  15. private static String dbURL = "jdbc:derby:db/eveApi;create=true;user=eveApi;password=api881";
  16. private static Connection createConnection() {
  17. try {
  18. return DriverManager.getConnection(dbURL);
  19. } catch (SQLException ex) {
  20. ex.printStackTrace();
  21. return null;
  22. }
  23. }
  24. public static EveApi getApi() {
  25. return new EveApi(createConnection());
  26. }
  27. }