import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
+import javax.persistence.JoinTable;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
+import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.log4j.Logger;
@OneToMany
+ @JoinTable(name="RelationshipTermBase_inverseRepresentation")
@Cascade({CascadeType.SAVE_UPDATE, CascadeType.DELETE})
public Set<Representation> getInverseRepresentations() {
return inverseRepresentations;
Set<Representation> inverseRepresentations) {
this.inverseRepresentations = inverseRepresentations;
}
- public void addRepresentation(Representation representation) {
- this.inverseRepresentations.add(representation);
+ public void addInverseRepresentation(Representation inverseRepresentation) {
+ this.inverseRepresentations.add(inverseRepresentation);
}
- public void removeRepresentation(Representation representation) {
- this.inverseRepresentations.remove(representation);
+ public void removeInverseRepresentation(Representation inverseRepresentation) {
+ this.inverseRepresentations.remove(inverseRepresentation);
+ }
+ public void addRepresentation(Representation representation, Representation inverseRepresentation) {
+ this.addRepresentation(representation);
+ this.addInverseRepresentation(inverseRepresentation);
}
@Transient