All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.ymatrix.api.ColumnMetaWrapper Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package cn.ymatrix.api;

public class ColumnMetaWrapper {

    public static ColumnMetaWrapper wrap(ColumnMeta columnMeta) throws NullPointerException {
        if (columnMeta == null) {
            throw new NullPointerException("Wrap on an empty columnMeta.");
        }
        return new ColumnMetaWrapper(columnMeta);
    }

    private ColumnMetaWrapper(ColumnMeta columnMeta) throws NullPointerException {
        this.type = columnMeta.getType();
        this.name = columnMeta.getName();
        this.num = columnMeta.getNum();
        this.isNotNull = columnMeta.getIsNotNull();
        this.isSetDefault = columnMeta.getIsSetDefault();
        this.isSerial = columnMeta.getIsSerial();
        this.isExcluded = columnMeta.getIsExcluded();
        this.isUpsertKey = columnMeta.getIsUpsertKey();
        this.isDeduplicateKey = columnMeta.getIsDeduplicateKey();
        this.defaultValue = columnMeta.getDefault();
    }

    private String type;

    private String name;

    private int num;

    private boolean isNotNull;

    private boolean isSetDefault;

    private boolean isSerial;

    private boolean isExcluded;

    private boolean isUpsertKey;

    private boolean isDeduplicateKey;

    private String defaultValue;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public boolean isNotNull() {
        return isNotNull;
    }

    public void setNotNull(boolean notNull) {
        isNotNull = notNull;
    }

    public boolean isSetDefault() {
        return isSetDefault;
    }

    public void setSetDefault(boolean setDefault) {
        isSetDefault = setDefault;
    }

    public boolean isSerial() {
        return isSerial;
    }

    public void setSerial(boolean serial) {
        isSerial = serial;
    }

    public boolean isExcluded() {
        return isExcluded;
    }

    public void setExcluded(boolean excluded) {
        isExcluded = excluded;
    }

    public boolean isUpsertKey() {
        return isUpsertKey;
    }

    public void setUpsertKey(boolean upsertKey) {
        isUpsertKey = upsertKey;
    }

    public boolean isDeduplicateKey() {
        return isDeduplicateKey;
    }

    public void setDeduplicateKey(boolean deduplicateKey) {
        isDeduplicateKey = deduplicateKey;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy