org.hibernate.envers.configuration.internal.metadata.EntityXmlMappingData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-envers-jakarta Show documentation
Show all versions of hibernate-envers-jakarta Show documentation
Hibernate's entity version (audit/history) support Jakarta edition
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.envers.configuration.internal.metadata;
import java.util.ArrayList;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
/**
* @author Adam Warski (adam at warski dot org)
*/
public class EntityXmlMappingData {
private Document mainXmlMapping;
private List additionalXmlMappings;
/**
* The xml element that maps the class. The root can be one of the folowing elements:
* class, subclass, union-subclass, joined-subclass
*/
private Element classMapping;
public EntityXmlMappingData() {
mainXmlMapping = DocumentHelper.createDocument();
additionalXmlMappings = new ArrayList<>();
}
public Document getMainXmlMapping() {
return mainXmlMapping;
}
public List getAdditionalXmlMappings() {
return additionalXmlMappings;
}
public Document newAdditionalMapping() {
Document additionalMapping = DocumentHelper.createDocument();
additionalXmlMappings.add( additionalMapping );
return additionalMapping;
}
public Element getClassMapping() {
return classMapping;
}
public void setClassMapping(Element classMapping) {
this.classMapping = classMapping;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy