use of org.hibernate.boot.jaxb.mapping.spi.JaxbMapKeyJoinColumn in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method buildMapKeyJoinColumns.
private MapKeyJoinColumn[] buildMapKeyJoinColumns(List<JaxbMapKeyJoinColumn> elements) {
List<MapKeyJoinColumn> joinColumns = new ArrayList<>();
if (elements != null) {
for (JaxbMapKeyJoinColumn element : elements) {
AnnotationDescriptor column = new AnnotationDescriptor(MapKeyJoinColumn.class);
copyAttribute(column, "name", element.getName(), false);
copyAttribute(column, "referenced-column-name", element.getReferencedColumnName(), false);
copyAttribute(column, "unique", element.isUnique(), false);
copyAttribute(column, "nullable", element.isNullable(), false);
copyAttribute(column, "insertable", element.isInsertable(), false);
copyAttribute(column, "updatable", element.isUpdatable(), false);
copyAttribute(column, "column-definition", element.getColumnDefinition(), false);
copyAttribute(column, "table", element.getTable(), false);
joinColumns.add(AnnotationFactory.create(column));
}
}
return joinColumns.toArray(new MapKeyJoinColumn[joinColumns.size()]);
}
use of org.hibernate.boot.jaxb.mapping.spi.JaxbMapKeyJoinColumn in project hibernate-orm by hibernate.
the class JPAXMLOverriddenAnnotationReader method getMapKeyJoinColumns.
private void getMapKeyJoinColumns(List<Annotation> annotationList, List<JaxbMapKeyJoinColumn> elements) {
MapKeyJoinColumn[] joinColumns = buildMapKeyJoinColumns(elements);
if (joinColumns.length > 0) {
AnnotationDescriptor ad = new AnnotationDescriptor(MapKeyJoinColumns.class);
ad.setValue("value", joinColumns);
annotationList.add(AnnotationFactory.create(ad));
}
}
Aggregations