/*
 * Copyright © 2019 by Data Virtuality GmbH
 */
package org.teiid.translator.jdbc.informix;

import org.teiid.common.buffer.Serializer;

import java.io.Serializable;
import java.sql.SQLData;
import java.sql.SQLException;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.util.Collection;
import java.util.Iterator;

/**
 * @author Roman Pedchenko
 * @date 2019.10.27
 */
public class FakeSQLData implements SQLData, Collection, Serializable {
    private static final long serialVersionUID = 2554693936414144347L;

    private String typeName = "collection";

    public FakeSQLData() {
    }

    @Override
    public String getSQLTypeName() throws SQLException {
        return null;
    }

    @Override
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
        this.typeName = typeName;
    }

    @Override
    public void writeSQL(SQLOutput stream) throws SQLException {

    }

    @Override
    public String toString() {
        return "[SQL data: " + typeName + "]";
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public boolean contains(Object o) {
        return false;
    }

    @Override
    public Iterator iterator() {
        return null;
    }

    @Override
    public Object[] toArray() {
        return new Object[0];
    }

    @Override
    public boolean add(Object o) {
        return false;
    }

    @Override
    public boolean remove(Object o) {
        return false;
    }

    @Override
    public boolean addAll(Collection c) {
        return false;
    }

    @Override
    public void clear() {

    }

    @Override
    public boolean retainAll(Collection c) {
        return false;
    }

    @Override
    public boolean removeAll(Collection c) {
        return false;
    }

    @Override
    public boolean containsAll(Collection c) {
        return false;
    }

    @Override
    public Object[] toArray(Object[] a) {
        return new Object[0];
    }
}
