Switch self reference
This commit is contained in:
parent
6db6c6b2e5
commit
dd80bfe4c6
@ -20,100 +20,100 @@ public class Organization implements IOrganization {
|
||||
@ManyToMany(targetEntity = Organization.class)
|
||||
@JoinTable(
|
||||
name = J_ORGANIZATION_PARTS,
|
||||
joinColumns = @JoinColumn(name = I_ORGANIZATION_PART_OF),
|
||||
inverseJoinColumns = @JoinColumn(name = I_ORGANIZATION_PARTS)
|
||||
joinColumns = @JoinColumn(name = I_ORGANIZATION_PARTS),
|
||||
inverseJoinColumns = @JoinColumn(name = I_ORGANIZATION_PART_OF)
|
||||
)
|
||||
private Collection<IOrganization> parts = new ArrayList<>();
|
||||
|
||||
@ManyToMany(mappedBy = "parts", targetEntity = Organization.class)
|
||||
@ManyToMany(targetEntity = Organization.class, mappedBy = M_ORGANIZATION_PARTS)
|
||||
private Collection<IOrganization> partOf = new ArrayList<>();
|
||||
|
||||
@ManyToMany(targetEntity = Vehicle.class)
|
||||
@JoinTable(name=J_ORGANIZATION_VEHICLE,
|
||||
joinColumns = @JoinColumn(name = I_ORGANIZATION),
|
||||
inverseJoinColumns = @JoinColumn(name = I_VEHICLES))
|
||||
private Collection<IVehicle> vehicles = new ArrayList<>();
|
||||
|
||||
@OneToMany(targetEntity = Employment.class)
|
||||
@ManyToMany(targetEntity = Employment.class)
|
||||
private Collection<IEmployment> employments = new ArrayList<>();
|
||||
|
||||
public Organization() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getId() {
|
||||
return null;
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(Long id) {
|
||||
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IOrganization> getParts() {
|
||||
return null;
|
||||
return parts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParts(Collection<IOrganization> parts) {
|
||||
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPart(IOrganization part) {
|
||||
|
||||
this.parts.add(part);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IOrganization> getPartOf() {
|
||||
return null;
|
||||
return partOf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPartOf(Collection<IOrganization> partOf) {
|
||||
|
||||
this.partOf = partOf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPartOf(IOrganization partOf) {
|
||||
|
||||
this.partOf.add(partOf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IEmployment> getEmployments() {
|
||||
return null;
|
||||
return employments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmployments(Collection<IEmployment> employments) {
|
||||
|
||||
this.employments = employments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEmployment(IEmployment employment) {
|
||||
|
||||
this.employments.add(employment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IVehicle> getVehicles() {
|
||||
return null;
|
||||
return vehicles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVehicles(Collection<IVehicle> vehicles) {
|
||||
|
||||
this.vehicles = vehicles;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addVehicle(IVehicle vehicle) {
|
||||
|
||||
this.vehicles.add(vehicle);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user