public static IDataSet createDataSet(IStatement statement) {
IDataSet dataSet;
dataSet = null;
if(statement instanceof HQLStatement) {
dataSet = new HQLDataSet( (HQLStatement)statement );
} else if(statement instanceof JPQLStatement) {
dataSet = new JPQLDataSet( (JPQLStatement)statement );
} else {
throw new RuntimeException("Impossible to create dataset from a statement of type [" + statement.getClass().getName() + "]");
}