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

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

public class VerdictFacade
extends java.lang.Object

Author:
piccolo

Constructor Summary
VerdictFacade(CassandraWrapper w)
           
 
Method Summary
 void deleteVerdictAggregationList(java.lang.String idAggregation)
           
 java.util.Collection<Verdict> getAllRecords()
          it returns all the entries of the table AtomicInteraction.
 java.util.Collection<Verdict> getConsumerVerdictByApplication(java.lang.String idApplicationReputation)
          it returns the list of verdicts being the consumer associated to a given application
 java.util.Collection<Verdict> getProducerVerdictByApplication(java.lang.String idApplicationReputation)
          it returns the list of verdicts being the producers associated to a given application
 java.util.Collection<Verdict> getRecordsByEvaluatedToConsumerAndDate(java.lang.String idUserServiceConsumer, java.util.Date LowerBoundFilter, java.util.Date UpperBoundFilter)
          this method returns the collection of all atomic interaction referred to a given idUserService which is a consumer (so referred to the table UserServiceConsumer) whose feedback have been provided to the consumer (which means that the field recipientOfTheFeedback corresponds to CONSUMER) and whose timestamp is within the considered temporal range.
 java.util.Collection<Verdict> getRecordsByEvaluatedToProducerAndDate(java.lang.String idUserService, java.util.Date LowerBoundFilter, java.util.Date UpperBoundFilter)
          this method returns the collection of all atomic interaction referred to a given idUserService which is a producer (so referred to the table UserServiceProvider) whose feedback have been provided to the producer (which means that the field recipientOfTheFeedback corresponds to PRODUCER) and whose timestamp is within the considered temporal range.
 java.util.Collection<Verdict> getVerdictByUserReputation(java.lang.String idUserReputation)
          it returns the verdicts associated to a given user
 java.util.Collection<Verdict> getVerdictsByIdAggregation(java.lang.String idAggregation)
          it returns the collection of all verdicts belonging to a given aggregation
 void persist(Verdict tc)
          this methods persists the object given in input in the database (it 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).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerdictFacade

public VerdictFacade(CassandraWrapper w)
Method Detail

getAllRecords

public java.util.Collection<Verdict> getAllRecords()
                                            throws InternalBackEndException
it returns all the entries of the table AtomicInteraction. In an SQL-like syntax SELECT * FROM AtomicInteraction;

Throws:
InternalBackEndException

persist

public void persist(Verdict tc)
             throws PersistException,
                    InternalBackEndException
this methods persists the object given in input in the database (it 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

Parameters:
tc - the object to be persisted
Throws:
PersistException - if the writing operation fails
InternalBackEndException

getRecordsByEvaluatedToProducerAndDate

public java.util.Collection<Verdict> getRecordsByEvaluatedToProducerAndDate(java.lang.String idUserService,
                                                                            java.util.Date LowerBoundFilter,
                                                                            java.util.Date UpperBoundFilter)
                                                                     throws InternalBackEndException
this method returns the collection of all atomic interaction referred to a given idUserService which is a producer (so referred to the table UserServiceProvider) whose feedback have been provided to the producer (which means that the field recipientOfTheFeedback corresponds to PRODUCER) and whose timestamp is within the considered temporal range. In an SQL-like language SELECT AtomicInteraction.* FROM AtomicInteraction WHERE recipientOfTheFeedback = PRODUCER AND Range(timestamp,$LowerBoundFilter,$UpperBoundFilter) AND idUserServiceProducer = $idUserService

Parameters:
idUserService - the id of the producer (referred to the table UserServiceProvider)
LowerBoundFilter - the temporal lower bound
UpperBoundFilter - the temporal upper bound
Returns:
the collection after having executed the query
Throws:
InternalBackEndException

getRecordsByEvaluatedToConsumerAndDate

public java.util.Collection<Verdict> getRecordsByEvaluatedToConsumerAndDate(java.lang.String idUserServiceConsumer,
                                                                            java.util.Date LowerBoundFilter,
                                                                            java.util.Date UpperBoundFilter)
                                                                     throws InternalBackEndException
this method returns the collection of all atomic interaction referred to a given idUserService which is a consumer (so referred to the table UserServiceConsumer) whose feedback have been provided to the consumer (which means that the field recipientOfTheFeedback corresponds to CONSUMER) and whose timestamp is within the considered temporal range. In an SQL-like language SELECT AtomicInteraction.* FROM AtomicInteraction WHERE recipientOfTheFeedback = CONSUMER AND Range(timestamp,$LowerBoundFilter,$UpperBoundFilter) AND idUserServiceConsumer = $idUserService

Parameters:
idUserService - the id of the producer (referred to the table UserServiceProvider)
LowerBoundFilter - the temporal lower bound
UpperBoundFilter - the temporal upper bound
Returns:
the collection after having executed the query
Throws:
InternalBackEndException

getVerdictsByIdAggregation

public java.util.Collection<Verdict> getVerdictsByIdAggregation(java.lang.String idAggregation)
                                                         throws InternalBackEndException
it returns the collection of all verdicts belonging to a given aggregation

Parameters:
idAggr -
Returns:
Throws:
InternalBackEndException

deleteVerdictAggregationList

public void deleteVerdictAggregationList(java.lang.String idAggregation)
                                  throws InternalBackEndException
Throws:
InternalBackEndException

getVerdictByUserReputation

public java.util.Collection<Verdict> getVerdictByUserReputation(java.lang.String idUserReputation)
it returns the verdicts associated to a given user

Parameters:
idUserReputation -
Returns:

getProducerVerdictByApplication

public java.util.Collection<Verdict> getProducerVerdictByApplication(java.lang.String idApplicationReputation)
it returns the list of verdicts being the producers associated to a given application

Parameters:
idApplicationReputation -
Returns:

getConsumerVerdictByApplication

public java.util.Collection<Verdict> getConsumerVerdictByApplication(java.lang.String idApplicationReputation)
it returns the list of verdicts being the consumer associated to a given application

Parameters:
idApplicationReputation -
Returns: