/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dhaval.web.vaadin.simple.domain;

import java.io.Serializable;

/**
 *
 * @author dhaval
 */
public class FormField implements Serializable{

    private String name;
    private String type;

    public FormField() {
    }

    public FormField(String name, String type) {
        this.name = name;
        this.type = type;
    }

    
    public String getName() {
        return name;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object obj) {
        if( ! (obj instanceof FormField) ){
            return false;
        }

        FormField  ff = (FormField) obj;
        if(ff.getName().equalsIgnoreCase(getName())){
            return true;
        }else{
            return false;
        }
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 41 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }


}
