package uk.ac.cam.cstibhotel.otcanalyser.database;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;

public class BoolSQLField extends SQLField {

	private final Boolean fieldValue;

	public BoolSQLField(Boolean fieldValue) {
		this.fieldValue = fieldValue;
	}
	
	@Override
	public String getType() {
		return "BOOLEAN";
	}

	@Override
	public void addToPreparedStatement(PreparedStatement p) throws SQLException {
		if (fieldValue == null)
			p.setNull(index, Types.BOOLEAN);
		else
			p.setBoolean(index, fieldValue);
	}
	
}

@@ -473,16 +473,18 @@
 == null)
+ %7B
 %0A%09%09%09p.se
@@ -518,12 +518,16 @@
 ;%0A%09%09
+%7D 
 else
+ %7B
 %0A%09%09%09
@@ -559,15 +559,19 @@
 Value);%0A
+%09%09%7D%0A
 %09%7D%0A%09%0A%7D%0A

Add brackets