package com.eactive.testmaster.socket.controller;

import com.eactive.testmaster.common.search.BaseSearch;
import com.eactive.testmaster.common.search.ColumnSearchModel;
import com.eactive.testmaster.common.search.SearchCondition;
import com.eactive.testmaster.common.search.SearchModel;
import com.eactive.testmaster.socket.entity.NettyServerEntity;
import java.util.ArrayList;
import java.util.List;

public class NettyTCPServerSearch implements BaseSearch<NettyServerEntity> {

    private String name;
    private Long port;

    @Override
    public List<SearchModel> buildSearchCondition() {
        List<SearchModel> models = new ArrayList<>();
        models.add(new ColumnSearchModel("name", SearchCondition.LIKE, name));
        models.add(new ColumnSearchModel("port", SearchCondition.EQUAL, port));
        return models;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPort() {
        return port;
    }

    public void setPort(Long port) {
        this.port = port;
    }
}
