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

wiki.xsx.jg.core.Column Maven / Gradle / Ivy

Go to download

a generator, from the database tables convert to the Java classes or from the Java classes convert to the database tables. support mysql, oracle and sqlserver.

There is a newer version: 1.2.1
Show newest version
package wiki.xsx.jg.core;

/**
 * 数据库表中的列对象
 */
public class Column {
    // 列名称
    private String name;
    // 列类型
    private String type;
    // 列的Java类型
    private Class javaType;
    // 列总长度
    private Integer lengh;
    // 列的小数位数
    private Integer scale;
    // 列的默认值
    private String defaultValue;
    // 是否为自增(mysql使用)
    private boolean isAutoIncrement;
    // 是否不为NULL
    private boolean isNotNull;
    // 是否为主键
    private boolean isPrimaryKey;
    // 是否为外键
    private boolean isForeignKey;
    // 列的注释
    private String remark;

    public String getName() {
        return name;
    }

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

    public String getType() {
        return type;
    }

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

    public Class getJavaType() {
        return javaType;
    }

    public void setJavaType(Class javaType) {
        this.javaType = javaType;
    }

    public Integer getLengh() {
        return lengh;
    }

    public void setLengh(Integer lengh) {
        this.lengh = lengh;
    }

    public Integer getScale() {
        return scale;
    }

    public void setScale(Integer scale) {
        this.scale = scale;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

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

    public Boolean getIsAutoIncrement() {
        return isAutoIncrement;
    }

    public void setIsAutoIncrement(boolean isAutoIncrement) {
        this.isAutoIncrement = isAutoIncrement;
    }

    public boolean getIsNotNull() {
        return isNotNull;
    }

    public void setIsNotNull(boolean isNotNull) {
        this.isNotNull = isNotNull;
    }

    public boolean getIsPrimaryKey() {
        return isPrimaryKey;
    }

    public void setIsPrimaryKey(boolean isPrimaryKey) {
        this.isPrimaryKey = isPrimaryKey;
    }

    public boolean getIsForeignKey() {
        return isForeignKey;
    }

    public void setIsForeignKey(boolean isForeignKey) {
        this.isForeignKey = isForeignKey;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "Column{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", javaType=" + javaType +
                ", lengh=" + lengh +
                ", scale=" + scale +
                ", defaultValue='" + defaultValue + '\'' +
                ", isAutoIncrement=" + isAutoIncrement +
                ", isNotNull=" + isNotNull +
                ", isPrimaryKey=" + isPrimaryKey +
                ", isForeignKey=" + isForeignKey +
                ", remark='" + remark + '\'' +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy