You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-hrm-organization/src/com/engine/organization/entity/commom/FieldInfo.java

125 lines
3.3 KiB
Java

package com.engine.organization.entity.commom;
import java.util.Objects;
/**
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public class FieldInfo {
/**
*
*/
private String fieldName;
/**
*
*/
private Class<?> firstFieldType;
/**
*
*/
private Class<?> secondFieldType;
/**
*
*/
private Object firstVal;
/**
*
*/
private Object secondVal;
public FieldInfo() {
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
}
public FieldInfo(String fieldName, Class<?> fieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = fieldType;
this.secondFieldType = fieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public Class<?> getFirstFieldType() {
return firstFieldType;
}
public void setFirstFieldType(Class<?> firstFieldType) {
this.firstFieldType = firstFieldType;
}
public Object getFirstVal() {
return firstVal;
}
public void setFirstVal(Object firstVal) {
this.firstVal = firstVal;
}
public void setSecondFieldType(Class<?> secondFieldType) {
this.secondFieldType = secondFieldType;
}
public Class<?> getSecondFieldType() {
return secondFieldType;
}
public Object getSecondVal() {
return secondVal;
}
public void setSecondVal(Object secondVal) {
this.secondVal = secondVal;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FieldInfo fieldInfo = (FieldInfo) o;
return Objects.equals(fieldName, fieldInfo.fieldName) &&
Objects.equals(firstFieldType, fieldInfo.firstFieldType) &&
Objects.equals(secondFieldType, fieldInfo.secondFieldType) &&
Objects.equals(firstVal, fieldInfo.firstVal) &&
Objects.equals(secondVal, fieldInfo.secondVal);
}
@Override
public int hashCode() {
return Objects.hash(fieldName, firstFieldType, secondFieldType, firstVal, secondVal);
}
@Override
public String toString() {
return "FieldInfo{" +
"fieldName='" + fieldName + '\'' +
", firstFieldType=" + firstFieldType +
", secondFieldType=" + secondFieldType +
", firstVal=" + firstVal +
", secondVal=" + secondVal +
'}';
}
}