Example usage for org.hibernate.mapping UniqueKey getColumnIterator

List of usage examples for org.hibernate.mapping UniqueKey getColumnIterator

Introduction

In this page you can find the example usage for org.hibernate.mapping UniqueKey getColumnIterator.

Prototype

public Iterator<Column> getColumnIterator() 

Source Link

Usage

From source file:org.web4thejob.orm.UniqueKeyConstraintImpl.java

License:Open Source License

public UniqueKeyConstraintImpl(EntityMetadata entityMetadata, UniqueKey uniqueKey) {
    this.entityMetadata = entityMetadata;

    Set<PropertyMetadata> temp = new HashSet<PropertyMetadata>();
    for (Iterator<?> iterCols = uniqueKey.getColumnIterator(); iterCols.hasNext();) {
        Column column = (Column) iterCols.next();
        PropertyMetadata propertyMetadata = getPropertyForColumn(column);
        if (propertyMetadata != null) {
            temp.add(propertyMetadata);/*from w  ww. j  av a2s  .  c o m*/
        }
    }

    propertyMetadatas = Collections.unmodifiableSet(temp);
}