List of usage examples for org.hibernate.mapping PersistentClass getDirectSubclasses
public Iterator getDirectSubclasses()
From source file:com.oy.shared.lm.ext.HBMCtoGRAPH.java
License:Open Source License
private void processClasses(PersistentClass[] nodes) { for (int i = 0; i < nodes.length; i++) { PersistentClass node = nodes[i]; String clazz = node.getClassName(); GraphNode current = getOrCreateNode(clazz); // process attributes processProperties(node.getPropertyIterator(), current); // process subclasses processSubclasses(current,/*from w w w . j a v a 2 s.c o m*/ (PersistentClass[]) iterToList(node.getDirectSubclasses()).toArray(new PersistentClass[] {})); } }
From source file:com.wavemaker.tools.data.WMHibernateConfigurationExporter.java
License:Open Source License
@SuppressWarnings("unchecked") private void dump(PrintWriter pw, boolean useClass, PersistentClass element) { if (useClass) { pw.println("<mapping class=\"" + element.getClassName() + "\"/>"); } else {/* ww w . ja va 2 s . c o m*/ pw.println("<mapping resource=\"" + getMappingFileResource(element) + "\"/>"); } Iterator directSubclasses = element.getDirectSubclasses(); while (directSubclasses.hasNext()) { PersistentClass subclass = (PersistentClass) directSubclasses.next(); dump(pw, useClass, subclass); } }
From source file:edu.wustl.common.util.dbManager.HibernateMetaData.java
License:BSD License
/** * This method returns the list of subclasses of the className * @author aarti_sharma/*from w ww .j a v a2 s .c o m*/ * @param className * @return * @throws ClassNotFoundException */ public static List getSubClassList(String className) throws ClassNotFoundException { List list = new ArrayList(); //System.out.println("className :::"+ className); Class classObj = Class.forName(className); //System.out.println("classObj :::"+ classObj); PersistentClass classobj1 = cfg.getClassMapping(classObj.getName()); Iterator it = classobj1.getDirectSubclasses(); //Iterator it = cfg.getClassMapping(classObj).getDirectSubclasses(); while (it.hasNext()) { Subclass subClass = (Subclass) it.next(); System.out.println(subClass.getClass().getName()); //System.out.println("Name "+subClass.getName()); list.add(subClass.getClassName()); } return list; }