com.mymed.controller.core.manager.reputation.db.table.facade
Class VerdictAggregationFacade

java.lang.Object
  extended by com.mymed.controller.core.manager.reputation.db.table.facade.VerdictAggregationFacade

public class VerdictAggregationFacade
extends java.lang.Object

Author:
piccolo

Constructor Summary
VerdictAggregationFacade(CassandraWrapper w)
           
 
Method Summary
 void deleteAggregation(java.lang.String idAggreagation)
          this method delete a previously created VerdictAggregation
 java.util.Collection<VerdictAggregation> getAllRecords()
          it returns the collection of all entries of the table VerdictAggregation.
 java.util.Collection<VerdictAggregation> getListOfAggregationByVerdict(java.lang.String idVerdict)
          it returns the list of all aggregations to which a given verdict belongs
 VerdictAggregation getRecordById(java.lang.String idAggregation)
          it returns the entry of the table VerdictAggregation having the specified id.
 void persist(VerdictAggregation va)
          this methods persists the object given in input in the database (he could do an INSERT statement or an UPDATE statement depending on the fact that the object given in input has a new id or not).
 void persist(VerdictAggregation va, Verdict v)
          this method adds the verdict object to the verdict aggregation whose object is in input.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerdictAggregationFacade

public VerdictAggregationFacade(CassandraWrapper w)
Method Detail

getAllRecords

public java.util.Collection<VerdictAggregation> getAllRecords()
                                                       throws InternalBackEndException
it returns the collection of all entries of the table VerdictAggregation. In an SQL-like sintax, it returns the result of the query SELECT * FROM ComplexInteraction;

Returns:
Throws:
InternalBackEndException

persist

public void persist(VerdictAggregation va)
             throws PersistException
this methods persists the object given in input in the database (he could do an INSERT statement or an UPDATE statement depending on the fact that the object given in input has a new id or not). It throws an Exception if the persist operation fails. If it inserts a new item, then it updates the corresponding primary key

Throws:
PersistException

persist

public void persist(VerdictAggregation va,
                    Verdict v)
this method adds the verdict object to the verdict aggregation whose object is in input.

Parameters:
va - verdict aggregation where the new judgment will be added
v - the Verdict object to be added to the aggregation

deleteAggregation

public void deleteAggregation(java.lang.String idAggreagation)
                       throws InternalBackEndException
this method delete a previously created VerdictAggregation

Parameters:
idAggregation -
Throws:
PersistException - if the writing operation fails
InternalBackEndException

getRecordById

public VerdictAggregation getRecordById(java.lang.String idAggregation)
                                 throws InternalBackEndException
it returns the entry of the table VerdictAggregation having the specified id. In an SQL-like syntax, it returns the result of the query SELECT * FROM VerdictAggregation WHERE id = $id;

Parameters:
id -
Returns:
Throws:
InternalBackEndException

getListOfAggregationByVerdict

public java.util.Collection<VerdictAggregation> getListOfAggregationByVerdict(java.lang.String idVerdict)
                                                                       throws InternalBackEndException
it returns the list of all aggregations to which a given verdict belongs

Parameters:
idVerdict -
Returns:
Throws:
InternalBackEndException