Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.transition.chda.model;
- import com.j256.ormlite.dao.ForeignCollection;
- import com.j256.ormlite.field.DatabaseField;
- import com.j256.ormlite.field.ForeignCollectionField;
- import com.j256.ormlite.table.DatabaseTable;
- public abstract class Principal {
- private Object principal;
- @DatabaseField(generatedId = true)
- private int id;
- @DatabaseField(canBeNull = false, unique = true)
- private String userName;
- @DatabaseField(canBeNull = false)
- private String password;
- @DatabaseField()
- private String email;
- @DatabaseField()
- private boolean isAdmin;
- @ForeignCollectionField(foreignFieldName = "creator")
- private ForeignCollection<BusinessObject> createdChangeNotice;
- @ForeignCollectionField(foreignFieldName = "modifier")
- private ForeignCollection<BusinessObject> modifiedChangeNotice;
- @ForeignCollectionField(foreignFieldName = "creator")
- private ForeignCollection<ChangeRequest> createdChangeRequest;
- @ForeignCollectionField(foreignFieldName = "modifier")
- private ForeignCollection<ChangeRequest> modifiedChangeRequested;
- @ForeignCollectionField(foreignFieldName = "creator")
- private ForeignCollection<Part> createdParts;
- @ForeignCollectionField(foreignFieldName = "modifier")
- private ForeignCollection<Part> modifiedParts;
- @ForeignCollectionField(foreignFieldName = "creator")
- private ForeignCollection<ProblemReport> createdProblemReports;
- @ForeignCollectionField(foreignFieldName = "modifier")
- private ForeignCollection<ProblemReport> modifierdProblemReports;
- public Principal(){
- }
- public Principal(Object principal) {
- this.principal = principal;
- }
- public Principal(String userName, String password, String email) {
- this.userName = userName;
- this.password = password;
- this.email = email;
- this.isAdmin = false;
- }
- protected Object getPrincipal() {
- return this.principal;
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getUserName() {
- return userName;
- }
- public void setUserName(String userName) {
- this.userName = userName;
- }
- private String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public boolean isAdmin() {
- return isAdmin;
- }
- public void setAdmin(boolean isAdmin) {
- this.isAdmin = isAdmin;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement