try {
HibernateUtil dh = new HibernateUtil(c);
String type = ((Inode) c.newInstance()).getType();
dh.setQuery("from inode in class " + c.getName() + " where inode.type='"+type+"' and " + condition);
Logger.debug(InodeFactory.class, "getInodeOfClassByCondition query: " + dh.getQuery());
return dh.load();
} catch (Exception e) {
Logger.warn(InodeFactory.class, "getInodeOfClassByCondition(Class c, String condition) failed:" + e, e);
// throw new DotRuntimeException(e.toString());
}