com.clougence.cloudcanal.sdk.api.modelv2.CustomFieldV2 Maven / Gradle / Ivy
package com.clougence.cloudcanal.sdk.api.modelv2;
import lombok.Getter;
import lombok.Setter;
/**
* @author bucketli 2021/12/1 10:11:11
*/
@Getter
@Setter
public class CustomFieldV2 {
private String fieldName;
/**
* typical is String , some special type value may be other java type
*/
private Object value;
/**
* only for RDB, reference to java.sql.Types
*/
private int sqlType;
private boolean isKey;
private boolean isNull;
/**
* only for update
*/
private boolean isUpdated;
public static CustomFieldV2 buildField(String fieldName, Object value, int sqlType, boolean isKey, boolean isNull, boolean isUpdated) {
CustomFieldV2 field = new CustomFieldV2();
field.setFieldName(fieldName);
field.setValue(value);
field.setSqlType(sqlType);
field.setKey(isKey);
field.setNull(isNull);
field.setUpdated(isUpdated);
return field;
}
public CustomFieldV2 cloneField() {
CustomFieldV2 field = new CustomFieldV2();
field.setFieldName(fieldName);
field.setValue(value);
field.setSqlType(sqlType);
field.setKey(isKey);
field.setNull(isNull);
field.setUpdated(isUpdated);
return field;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy