Created
October 11, 2013 11:22
-
-
Save demoth/6933158 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.spbstu.qmd.smk2.model.entity; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.ManyToOne; | |
import javax.validation.constraints.NotNull; | |
import ru.spbstu.qmd.smk2.model.entity.history.HistoryObject; | |
@Entity | |
public class Department extends HistoryObject { | |
// @ManyToOne(fetch = FetchType.LAZY) | |
@ManyToOne | |
@NotNull | |
private Faculty faculty; | |
private String name; | |
private Integer firstId; | |
@Column(length = 50) | |
private String abbreviation; | |
public Department() { | |
} | |
public Department(final Faculty faculty, | |
final String name, | |
final Integer firstId, | |
final String abbreviation) { | |
this.faculty = faculty; | |
this.name = name; | |
this.firstId = firstId; | |
this.abbreviation = abbreviation; | |
} | |
public final Faculty getFaculty() { | |
return this.faculty; | |
} | |
public final void setFaculty(final Faculty faculty) { | |
this.faculty = faculty; | |
} | |
public final String getName() { | |
return this.name; | |
} | |
public final void setName(final String name) { | |
this.name = name; | |
} | |
public final String getAbbreviation() { | |
return abbreviation; | |
} | |
public final void setAbbreviation(final String abbreviation) { | |
this.abbreviation = abbreviation; | |
} | |
public final Integer getFirstId() { | |
return firstId; | |
} | |
public final void setFirstId(final Integer firstId) { | |
this.firstId = firstId; | |
} | |
@Override | |
public final String toString() { | |
return "Department{" | |
+ "faculty=" + faculty | |
+ ", name='" + name + '\'' | |
+ ", abbreviation='" + abbreviation + '\'' | |
+ '}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment