ch.hevs.isi.db

## Class DatabaseConnector

- java.lang.Object
- - ch.hevs.isi.db.DatabaseConnector

All Implemented Interfaces:
  DataPointListener

    public class DatabaseConnector
    extends java.lang.Object
    implements DataPointListener

### Field Summary

Fields
`static java.lang.String` `bucket`
`static java.lang.String` `org`
`static java.lang.String` `url`

### Fields inherited from interface ch.hevs.isi.core.DataPointListener

`listeners`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static DatabaseConnector` `getMySelf()` Get the instance of the database connector
`void` `initialize(java.lang.String url)` Initialize the database connector
`void` `onNewValue(DataPoint dp)` Push the data point to the database

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface ch.hevs.isi.core.DataPointListener

`subscribeUpdate`

### Field Detail

#### url

    public static java.lang.String url

#### org

    public static java.lang.String org

#### bucket

    public static java.lang.String bucket

### Method Detail

#### getMySelf

    public static DatabaseConnector getMySelf()

Get the instance of the database connector

Returns:
  The instance of the database connector

#### initialize

    public void initialize(java.lang.String url)

Initialize the database connector

Parameters:
  `url` - URL of the database. If null take the URL from the config.properties file

#### onNewValue

    public void onNewValue(DataPoint dp)

Push the data point to the database

Specified by:
  `onNewValue` in interface `DataPointListener`
Parameters:
  `dp` - Data point to push