Sha256: 3a3cf3a3841846f83808969ed91530f0218112a11dd8a99fc28e72535aef0358

Contents?: true

Size: 1.39 KB

Versions: 5

Compression:

Stored size: 1.39 KB

Contents

package com.treasuredata.api.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Objects;

import java.util.List;

public class TDTable
{
    private String name;
    private TDTableType type;
    private List<TDColumn> columns;

    @JsonCreator
    public TDTable(
            @JsonProperty("name") String name,
            @JsonProperty("type") TDTableType type,
            @JsonProperty("schema") String schema)
    {
        this.name = name;
        this.type = type;
        this.columns = TDColumn.parseTuple(schema);
    }

    @JsonProperty
    public String getName()
    {
        return name;
    }

    @JsonProperty
    public TDTableType getType()
    {
        return type;
    }

    @JsonProperty
    public List<TDColumn> getColumns()
    {
        return columns;
    }

    @Override
    public boolean equals(Object obj)
    {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        TDTable other = (TDTable) obj;
        return Objects.equal(this.name, other.name) &&
                Objects.equal(this.type, other.type) &&
                Objects.equal(this.columns, other.columns);
    }

    @Override
    public int hashCode()
    {
        return Objects.hashCode(name, type, columns);
    }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
embulk-output-td-0.2.2 src/main/java/com/treasuredata/api/model/TDTable.java
embulk-output-td-0.2.1 src/main/java/com/treasuredata/api/model/TDTable.java
embulk-output-td-0.2.0 src/main/java/com/treasuredata/api/model/TDTable.java
embulk-output-td-0.1.8 src/main/java/com/treasuredata/api/model/TDTable.java
embulk-output-td-0.1.7 src/main/java/com/treasuredata/api/model/TDTable.java