📄 systemprivilegepk.java
字号:
package com.itcast.bean.privilege;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
public class SystemPrivilegePK implements Serializable{
private String model;
private String privilegeValue;
public SystemPrivilegePK(){}
public SystemPrivilegePK(String model, String privilegeValue) {
this.model = model;
this.privilegeValue = privilegeValue;
}
@Column(length=30,name="model")
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
@Column(length=20,name="privilegeValue")
public String getPrivilegeValue() {
return privilegeValue;
}
public void setPrivilegeValue(String privilegeValue) {
this.privilegeValue = privilegeValue;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((model == null) ? 0 : model.hashCode());
result = prime * result
+ ((privilegeValue == null) ? 0 : privilegeValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final SystemPrivilegePK other = (SystemPrivilegePK) obj;
if (model == null) {
if (other.model != null)
return false;
} else if (!model.equals(other.model))
return false;
if (privilegeValue == null) {
if (other.privilegeValue != null)
return false;
} else if (!privilegeValue.equals(other.privilegeValue))
return false;
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -