mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
49 lines
1.1 KiB
Java
49 lines
1.1 KiB
Java
package org.tests.query.cache;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import javax.annotation.Nonnull;
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.FetchType;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.OneToMany;
|
|
|
|
@Entity
|
|
public class Contract {
|
|
@Id
|
|
@GeneratedValue
|
|
protected Long id;
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "contract")
|
|
private List<Position> positions;
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "container", fetch = FetchType.LAZY)
|
|
@Nonnull
|
|
private List<AclContainerRelation> aclEntries = new ArrayList<>();
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(final Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public List<Position> getPositions() {
|
|
return positions;
|
|
}
|
|
|
|
public void setPositions(final List<Position> positions) {
|
|
this.positions = positions;
|
|
}
|
|
|
|
public List<AclContainerRelation> getAclEntries() {
|
|
return aclEntries;
|
|
}
|
|
|
|
public void setAclEntries(final List<AclContainerRelation> aclEntries) {
|
|
this.aclEntries = aclEntries;
|
|
}
|
|
} |