public class MyPKColumn extends MyColumn {
/**
* First Constructor for the class MyPrimaryKeyColumn,
* using this constructor isAutoIncrement() must return true
*/
public MyPKColumn() {
super("int", null);
this.setAutoIncrement(true);
}
/**
* First Constructor for the class MyPrimaryKeyColumn,
* using this constructor isAutoIncrement() must return true
* @param autoIncrement determines if this column will appears in the insertions
*/
public MyPKColumn(Boolean autoIncrement) {
super("int", null);
this.setAutoIncrement(autoIncrement);
}
/**
* Second Constructor for the class MyPrimaryKeyColumn,
* using this constructor isAutoIncrement() must return false
* @param type String representing the type of this column
* @param size Integer representing the size in bytes of this column
*/
public MyPKColumn(String type, Integer size) {
super(type, size);
this.setAutoIncrement(false);
}
/**
* @param args
*/
public static void main(String[] args) {
MyColumn teste = new MyPKColumn();
System.out.println(teste.getType());
System.out.println(teste.getSize());
}
}