use of org.h2.api.AggregateFunction in project h2database by h2database.
the class UserAggregate method getInstance.
public Aggregate getInstance() {
if (javaClass == null) {
javaClass = JdbcUtils.loadUserClass(className);
}
Object obj;
try {
obj = javaClass.newInstance();
Aggregate agg;
if (obj instanceof Aggregate) {
agg = (Aggregate) obj;
} else {
agg = new AggregateWrapper((AggregateFunction) obj);
}
return agg;
} catch (Exception e) {
throw DbException.convert(e);
}
}
Aggregations