dropbox
Class Data_Functions

java.lang.Object
  extended by dropbox.Data_Functions

public class Data_Functions
extends java.lang.Object

Java Programm to connect Oracle DB using Oracle JDBC thin driver for select, insert data from SQLite into Oracle Prodaction Database


Constructor Summary
Data_Functions()
           
 
Method Summary
 java.lang.String add_iov_string_array(java.lang.String[] new_iovs)
          INSERT an ARRAY of new IOVs into Productive database
 java.lang.String add_payload_single(java.lang.String hash, java.lang.String object_type, java.lang.String n_data)
          INSERT new SINGLE PAYLOAD into Productive database
 java.lang.String add_payload_string_array(java.lang.String[] new_payloads)
          INSERT an ARRAY of new PAYLOADs into Productive database
 java.lang.String add_tag_single(java.lang.String name, java.lang.String time_type, java.lang.String object_type, java.lang.String synchronization, int end_of_validity, java.lang.String description, int last_validated_time)
          INSERT SINGLE new TAG into Productive database
 java.lang.String add_tag_string_array(java.lang.String[] new_tags)
          INSERT an ARRAY of new TAGs into Productive database
static java.sql.Connection getDBConnection()
          Establish CONNECTION with the Production database
 java.lang.String[] is_payload_in_db_array(java.lang.String[] check_hash)
          Method to CHECK ARRAY of PAYLOADS if they are already in the Productive database Check is performed by hash names
 int is_payload_in_db_single(java.lang.String check_hash)
          CHECK SINGLE PAYLOAD if it is already in the Productive database Check is performed by hash names The method is realized in Java, but it is not used in Python
 java.lang.String[] is_tag_in_db_array(java.lang.String[] check_names)
          Check if there are new TAGs in the SQLite
 void test(java.lang.String[][] r)
          toString for ValueObjects
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Data_Functions

public Data_Functions()
Method Detail

getDBConnection

public static java.sql.Connection getDBConnection()
Establish CONNECTION with the Production database

Returns:
connection to the oracle production database

is_payload_in_db_single

public int is_payload_in_db_single(java.lang.String check_hash)
                            throws java.lang.Exception
CHECK SINGLE PAYLOAD if it is already in the Productive database Check is performed by hash names The method is realized in Java, but it is not used in Python

Parameters:
check_hash -
Returns:
an array of new hashes
Throws:
java.sql.SQLException
java.lang.Exception

is_payload_in_db_array

public java.lang.String[] is_payload_in_db_array(java.lang.String[] check_hash)
                                          throws java.lang.Exception
Method to CHECK ARRAY of PAYLOADS if they are already in the Productive database Check is performed by hash names

Parameters:
check_hash -
Returns:
an array of new hashes
Throws:
java.sql.SQLException
java.lang.Exception

is_tag_in_db_array

public java.lang.String[] is_tag_in_db_array(java.lang.String[] check_names)
                                      throws java.lang.Exception
Check if there are new TAGs in the SQLite

Parameters:
check_names -
Returns:
Throws:
java.lang.Exception

add_payload_single

public java.lang.String add_payload_single(java.lang.String hash,
                                           java.lang.String object_type,
                                           java.lang.String n_data)
                                    throws java.lang.Exception
INSERT new SINGLE PAYLOAD into Productive database

Parameters:
hash -
object_type -
n_data -
Returns:
Throws:
java.lang.Exception

add_payload_string_array

public java.lang.String add_payload_string_array(java.lang.String[] new_payloads)
                                          throws java.lang.Exception
INSERT an ARRAY of new PAYLOADs into Productive database

Parameters:
new_payloads -
Returns:
Throws:
java.lang.Exception

add_tag_single

public java.lang.String add_tag_single(java.lang.String name,
                                       java.lang.String time_type,
                                       java.lang.String object_type,
                                       java.lang.String synchronization,
                                       int end_of_validity,
                                       java.lang.String description,
                                       int last_validated_time)
                                throws java.lang.Exception
INSERT SINGLE new TAG into Productive database

Parameters:
name -
time_type -
object_type -
synchronization -
end_of_validity -
description -
last_validated_time -
Returns:
Throws:
java.lang.Exception

add_tag_string_array

public java.lang.String add_tag_string_array(java.lang.String[] new_tags)
                                      throws java.lang.Exception
INSERT an ARRAY of new TAGs into Productive database

Parameters:
new_tags -
Returns:
Throws:
java.lang.Exception

add_iov_string_array

public java.lang.String add_iov_string_array(java.lang.String[] new_iovs)
                                      throws java.lang.Exception
INSERT an ARRAY of new IOVs into Productive database

Parameters:
new_iovs -
Returns:
Throws:
java.lang.Exception

test

public void test(java.lang.String[][] r)
toString for ValueObjects

Parameters:
r -