use of org.hibernate.boot.jaxb.mapping.spi.JaxbIndex in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method buildIndex.
private static void buildIndex(AnnotationDescriptor annotation, List<JaxbIndex> elements) {
Index[] indexes = new Index[elements.size()];
int i = 0;
for (JaxbIndex element : elements) {
AnnotationDescriptor indexAnn = new AnnotationDescriptor(Index.class);
copyAttribute(indexAnn, "name", element.getName(), false);
copyAttribute(indexAnn, "column-list", element.getColumnList(), true);
copyAttribute(indexAnn, "unique", element.isUnique(), false);
indexes[i++] = AnnotationFactory.create(indexAnn);
}
annotation.setValue("indexes", indexes);
}
Aggregations