use of org.hibernate.internal.util.collections.JoinedIterator in project hibernate-orm by hibernate.
the class Component method getColumnIterator.
@Override
@SuppressWarnings("unchecked")
public Iterator<Selectable> getColumnIterator() {
Iterator[] iters = new Iterator[getPropertySpan()];
Iterator iter = getPropertyIterator();
int i = 0;
while (iter.hasNext()) {
iters[i++] = ((Property) iter.next()).getColumnIterator();
}
return new JoinedIterator(iters);
}
use of org.hibernate.internal.util.collections.JoinedIterator in project hibernate-orm by hibernate.
the class PersistentClass method getDeclaredPropertyIterator.
// The following methods are added to support @MappedSuperclass in the metamodel
public Iterator getDeclaredPropertyIterator() {
ArrayList iterators = new ArrayList();
iterators.add(declaredProperties.iterator());
for (int i = 0; i < joins.size(); i++) {
Join join = (Join) joins.get(i);
iterators.add(join.getDeclaredPropertyIterator());
}
return new JoinedIterator(iterators);
}
use of org.hibernate.internal.util.collections.JoinedIterator in project hibernate-orm by hibernate.
the class PersistentClass method getSubclassPropertyClosureIterator.
public Iterator getSubclassPropertyClosureIterator() {
ArrayList iters = new ArrayList();
iters.add(getPropertyClosureIterator());
iters.add(subclassProperties.iterator());
for (int i = 0; i < subclassJoins.size(); i++) {
Join join = (Join) subclassJoins.get(i);
iters.add(join.getPropertyIterator());
}
return new JoinedIterator(iters);
}
use of org.hibernate.internal.util.collections.JoinedIterator in project hibernate-orm by hibernate.
the class PersistentClass method getSubclassClosureIterator.
public Iterator getSubclassClosureIterator() {
ArrayList iters = new ArrayList();
iters.add(new SingletonIterator(this));
Iterator iter = getSubclassIterator();
while (iter.hasNext()) {
PersistentClass clazz = (PersistentClass) iter.next();
iters.add(clazz.getSubclassClosureIterator());
}
return new JoinedIterator(iters);
}
use of org.hibernate.internal.util.collections.JoinedIterator in project hibernate-orm by hibernate.
the class PersistentClass method getPropertyIterator.
/**
* Build an iterator over the properties defined on this class. The returned
* iterator only accounts for "normal" properties (i.e. non-identifier
* properties).
* <p/>
* Differs from {@link #getUnjoinedPropertyIterator} in that the returned iterator
* will include properties defined as part of a join.
* <p/>
* Differs from {@link #getReferenceablePropertyIterator} in that the properties
* defined in superclasses of the mapping inheritance are not included.
*
* @return An iterator over the "normal" properties.
*/
public Iterator getPropertyIterator() {
ArrayList iterators = new ArrayList();
iterators.add(properties.iterator());
for (int i = 0; i < joins.size(); i++) {
Join join = (Join) joins.get(i);
iterators.add(join.getPropertyIterator());
}
return new JoinedIterator(iterators);
}
Aggregations