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

com.wizarius.orm.database.DBManateeParsedField Maven / Gradle / Ivy

The newest version!
package com.wizarius.orm.database;

import java.lang.reflect.Field;

/**
 * @author Shyshkin Vladyslav on 29.04.17.
 */
public class DBManateeParsedField {
    private final String tableName;
    private final String fieldName;
    private final String dbFieldName;
    private final ManateeDBSupportedTypes fieldType;
    private final Class clazz;
    private final Field field;
    private DBManateeJoinField joinField;
    private final boolean autoincrement;

    public DBManateeParsedField(String tableName,
                                String fieldName,
                                String dbFieldName,
                                Class clazz,
                                Field field,
                                ManateeDBSupportedTypes fieldType,
                                boolean autoincrement) {
        this.tableName = tableName;
        this.fieldName = fieldName;
        this.dbFieldName = dbFieldName;
        this.fieldType = fieldType;
        this.field = field;
        this.clazz = clazz;
        this.autoincrement = autoincrement;
    }

    public boolean isAutoincrement() {
        return autoincrement;
    }

    public String getFieldName() {
        return fieldName;
    }

    public String getDbFieldName() {
        return dbFieldName;
    }

    public ManateeDBSupportedTypes getFieldType() {
        return fieldType;
    }

    public DBManateeJoinField getJoinField() {
        return joinField;
    }

    public boolean isJoinField() {
        return joinField != null;
    }

    public void setJoinField(DBManateeJoinField joinField) {
        this.joinField = joinField;
    }

    public Class getClazz() {
        return clazz;
    }

    public Field getField() {
        return field;
    }

    public String getTableName() {
        return tableName;
    }

    @Override
    public String toString() {
        return "DBManateeParsedField{" +
                "fieldName='" + fieldName + '\'' +
                ", dbFieldName='" + dbFieldName + '\'' +
                ", fieldType=" + fieldType +
                ", joinField=" + joinField +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy