Index: /trunk/ippToPsps/perl/checkOdmStatus.pl
===================================================================
--- /trunk/ippToPsps/perl/checkOdmStatus.pl	(revision 29081)
+++ /trunk/ippToPsps/perl/checkOdmStatus.pl	(revision 29082)
@@ -72,6 +72,6 @@
     my $numOfBatches;
 
-    if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatch($singleBatch, \$batches);}
-    else { $numOfBatches = $ippToPspsDb->getBatchList(\$batches, $fromTime, $toTime);}
+    if (defined $singleBatch ) { $numOfBatches = $ippToPspsDb->getSingleBatchOnDatastore($singleBatch, \$batches);}
+    else { $numOfBatches = $ippToPspsDb->getListOfBatchesOnDatastore(\$batches, $fromTime, $toTime);}
 
     if ($numOfBatches < 1) {return 0;}
Index: /trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm
===================================================================
--- /trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm	(revision 29081)
+++ /trunk/ippToPsps/perl/ippToPsps/IppToPspsDb.pm	(revision 29082)
@@ -15,6 +15,6 @@
 #
 ###########################################################################
-sub getBatchList {
-    my ($self, $exposures, $fromTime, $toTime) = @_;
+sub getListOfBatchesOnDatastore {
+    my ($self, $batches, $fromTime, $toTime) = @_;
 
     my $query = $self->{_db}->prepare(<<SQL);
@@ -29,6 +29,6 @@
     # TODO remove date restriction
     $query->execute;
-    ${$exposures} = $query->fetchall_arrayref();
-    my $count = scalar @{${$exposures}};
+    ${$batches} = $query->fetchall_arrayref();
+    my $count = scalar @{${$batches}};
 
    printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es");
@@ -41,6 +41,6 @@
 #
 ###########################################################################
-sub getSingleBatch{
-    my ($self, $batch_id, $exposures) = @_;
+sub getSingleBatchOnDatastore{
+    my ($self, $batch_id, $batches) = @_;
 
     my $query = $self->{_db}->prepare(<<SQL);
@@ -53,6 +53,6 @@
   
     $query->execute;
-    ${$exposures} = $query->fetchall_arrayref();
-    my $count = scalar @{${$exposures}};
+    ${$batches} = $query->fetchall_arrayref();
+    my $count = scalar @{${$batches}};
 
    printf( "* Found %d batch%s\n", $count, ($count==1) ? "" : "es");
@@ -424,3 +424,18 @@
     return $row[0];
 }
+
+sub insetDetection {
+    my ($self, $expId, $imageID, $objID,$ippObjID, $ippDetectID) = @_;
+
+   my $query = $self->{_db}->prepare(<<SQL);
+    INSERT INTO detections
+        (expId, imageID, objID, ippObjID, ippDetectID)
+        VALUES
+        ($expId, $imageID, $objID,$ippObjID, $ippDetectID);
+SQL
+
+    $query->execute;
+
+}
+
 1
