init
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* The primary key class for the tseaifr09 database table.
|
||||
*
|
||||
*/
|
||||
@Embeddable
|
||||
public class Tseaifr09PK implements Serializable {
|
||||
//default serial version id, required for serializable classes.
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(unique=true, nullable=false, length=20)
|
||||
private String type;
|
||||
|
||||
@Column(unique=true, nullable=false, length=100)
|
||||
private String name;
|
||||
|
||||
public Tseaifr09PK() {
|
||||
}
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof Tseaifr09PK)) {
|
||||
return false;
|
||||
}
|
||||
Tseaifr09PK castOther = (Tseaifr09PK)other;
|
||||
return
|
||||
this.type.equals(castOther.type)
|
||||
&& this.name.equals(castOther.name);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int hash = 17;
|
||||
hash = hash * prime + this.type.hashCode();
|
||||
hash = hash * prime + this.name.hashCode();
|
||||
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user