Search in sources :

Example 1 with JaxbAttributeOverride

use of org.hibernate.boot.jaxb.mapping.spi.JaxbAttributeOverride in project hibernate-orm by hibernate.

the class JPAXMLOverriddenAnnotationReader method buildAttributeOverrides.

private List<AttributeOverride> buildAttributeOverrides(List<JaxbAttributeOverride> subelements, String nodeName) {
    List<AttributeOverride> overrides = new ArrayList<>();
    if (subelements != null && subelements.size() > 0) {
        for (JaxbAttributeOverride current : subelements) {
            AnnotationDescriptor override = new AnnotationDescriptor(AttributeOverride.class);
            copyAttribute(override, "name", current.getName(), true);
            JaxbColumn column = current.getColumn();
            override.setValue("column", getColumn(column, true, nodeName));
            overrides.add(AnnotationFactory.create(override));
        }
    }
    return overrides;
}
Also used : AnnotationDescriptor(org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor) JaxbAttributeOverride(org.hibernate.boot.jaxb.mapping.spi.JaxbAttributeOverride) ArrayList(java.util.ArrayList) JaxbColumn(org.hibernate.boot.jaxb.mapping.spi.JaxbColumn) JaxbAttributeOverride(org.hibernate.boot.jaxb.mapping.spi.JaxbAttributeOverride) AttributeOverride(jakarta.persistence.AttributeOverride)

Aggregations

AttributeOverride (jakarta.persistence.AttributeOverride)1 ArrayList (java.util.ArrayList)1 AnnotationDescriptor (org.hibernate.annotations.common.annotationfactory.AnnotationDescriptor)1 JaxbAttributeOverride (org.hibernate.boot.jaxb.mapping.spi.JaxbAttributeOverride)1 JaxbColumn (org.hibernate.boot.jaxb.mapping.spi.JaxbColumn)1