Skip to content

Instantly share code, notes, and snippets.

@BenDol
Created August 6, 2015 02:21
Show Gist options
  • Save BenDol/000cb0b0cd7274a4fe8b to your computer and use it in GitHub Desktop.
Save BenDol/000cb0b0cd7274a4fe8b to your computer and use it in GitHub Desktop.
@Observable(inherit = true)
@Entity(name = "settings")
@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL)
public class Setting extends BaseSetting {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected int id = Model.UNSAVED_ID;
@Column(columnDefinition="VARCHAR")
protected LdapPerson person;
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Email.class)
@JoinColumn(name="email", referencedColumnName="id")
protected Email email;
@Override
public int getId() {
return id;
}
@Override
public void setId(int id) {
this.id = id;
}
public LdapPerson getPerson() {
return person;
}
public void setPerson(LdapPerson person) {
this.person = person;
}
public Email getEmail() {
return email;
}
public void setEmail(Email email) {
this.email = email;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment