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

com.github.wz2cool.dynamic.mybatis.ColumnInfo Maven / Gradle / Ivy

There is a newer version: 3.2.32
Show newest version
package com.github.wz2cool.dynamic.mybatis;

import org.apache.commons.lang3.StringUtils;

import java.lang.reflect.Field;

/**
 * Created by Frank on 2017/6/25.
 */
public class ColumnInfo {
    private String columnName;
    private String tableOrAlias;
    private Field field;

    public Field getField() {
        return field;
    }

    public void setField(Field field) {
        this.field = field;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getTableOrAlias() {
        return tableOrAlias;
    }

    public void setTableOrAlias(String tableOrAlias) {
        this.tableOrAlias = tableOrAlias;
    }

    public String getQueryColumn() {
        if (StringUtils.isNotBlank(getTableOrAlias())) {
            return String.format("%s.%s", getTableOrAlias(), getColumnName());
        } else {
            return this.columnName;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy