public Object[] findAll(Class resourceClass) {
RDFMetaResource metaResource = this.session.getMetaRDFResource(resourceClass);
if (metaResource == null) {
return new Object[]{};
} else {
SelectQueryGenerator sqg = QueryGeneratorFactory.createSelectQueryGenerator();
sqg.visit(metaResource);
QueryCodeGenerator qg = new QueryCodeGenerator();
qg.visit(sqg.getQuery());
QueryExecutor qe = this.session.getQueryExecutor();
ResultSet rs = qe.execSelect(qg.toString());
List<Object> objs = new ArrayList<Object>();
while (rs.hasNext()) {
objs.add(InstanceGenerator.create(resourceClass, rs.next()));