/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.wcs.netbeans.liquiface.ui.wizards.column;
/*
* #%L
* Liquiface - GUI for Liquibase
* %%
* Copyright (C) 2013 Webstar Csoport Kft.
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
/**
*
* @author botond
*/
public class UiColumnBean {
private String name;
private String type;
private boolean autoIncrement;
private boolean unique;
private boolean notNull;
private final PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
public void addPropertyChangeListener(PropertyChangeListener listener) {
changeSupport.addPropertyChangeListener(listener);
}
public void removePropertyChangeListener(PropertyChangeListener listener) {
changeSupport.removePropertyChangeListener(listener);
}
public String getName() {
return name;
}
public void setName(String name) {
String old = this.name;
this.name = name;
changeSupport.firePropertyChange("name", old, name);
}
public String getType() {
return type;
}
public void setType(String type) {
String old = this.type;
this.type = type;
changeSupport.firePropertyChange("type", old, type);
}
public boolean isAutoIncrement() {
return autoIncrement;
}
public void setAutoIncrement(boolean autoIncrement) {
boolean old = this.autoIncrement;
this.autoIncrement = autoIncrement;
changeSupport.firePropertyChange("autoIncrement", old, autoIncrement);
}
public boolean isUnique() {
return unique;
}
public void setUnique(boolean unique) {
boolean old = this.unique;
this.unique = unique;
changeSupport.firePropertyChange("unique", old, unique);
}
public boolean isNotNull() {
return notNull;
}
public void setNotNull(boolean notNull) {
boolean old = this.notNull;
this.notNull = notNull;
changeSupport.firePropertyChange("notNull", old, notNull);
}
}