org.hibernate.shards.strategy.exit
Class AvgResultsExitOperation

java.lang.Object
  extended by org.hibernate.shards.strategy.exit.AvgResultsExitOperation
All Implemented Interfaces:
ExitOperation

public class AvgResultsExitOperation
extends Object
implements ExitOperation

Performs post-processing on a result set that has had an average projection applied. This may not yield the exact same result as you'd get if you ran the query on a single shard because there seems to be some platform-specific wiggle. Here's a specific example: On hsqldb, if you have a column of type DECIMAL(10, 4) and you ask for the average of the values in that column, you get the floor of the result. On MySQL, if you have a column of the same type, you get a result back with the expected precision. So, um, just be careful.

Author:
[email protected] (Max Ross)

Constructor Summary
AvgResultsExitOperation()
           
 
Method Summary
 List<Object> apply(List<Object> results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvgResultsExitOperation

public AvgResultsExitOperation()
Method Detail

apply

public List<Object> apply(List<Object> results)
Specified by:
apply in interface ExitOperation