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

org.rx.bean.DataColumn Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.rx.bean;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.rx.core.Constants;

import java.util.HashMap;
import java.util.Map;

@SuppressWarnings(Constants.NON_UNCHECKED)
@RequiredArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
public class DataColumn extends AbstractAttributes {
    private static final long serialVersionUID = 6716648827629131928L;
    @JSONField(serialize = false)
    final DataTable table;
    String columnName;
    int ordinal;
    Class dataType;

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

    public DataColumn setOrdinal(int ordinal) {
        table.setOrdinal(this, ordinal);
        return this;
    }

    public  DataColumn setDataType(@NonNull Class dataType) {
        return table.setDataType(this, dataType);
    }

    @Override
    protected  Map initialAttrs() {
        return new HashMap<>();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy