Search in sources :

Example 1 with JoinedIterator

use of org.hibernate.eclipse.utils.JoinedIterator in project jbosstools-hibernate by jbosstools.

the class PersistentClassWorkbenchAdapter method getChildren.

public Object[] getChildren(Object o) {
    IPersistentClass pc = (IPersistentClass) o;
    IProperty identifierProperty = pc.getIdentifierProperty();
    List<IProperty> properties = new ArrayList<IProperty>();
    if (identifierProperty != null) {
        properties.add(identifierProperty);
    }
    Iterator<IProperty> propertyClosureIterator = new JoinedIterator<IProperty>(properties.iterator(), pc.getPropertyClosureIterator());
    return BasicWorkbenchAdapter.toArray(propertyClosureIterator, IProperty.class, null);
}
Also used : IProperty(org.jboss.tools.hibernate.runtime.spi.IProperty) ArrayList(java.util.ArrayList) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) JoinedIterator(org.hibernate.eclipse.utils.JoinedIterator)

Aggregations

ArrayList (java.util.ArrayList)1 JoinedIterator (org.hibernate.eclipse.utils.JoinedIterator)1 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)1 IProperty (org.jboss.tools.hibernate.runtime.spi.IProperty)1