public ColumnConstraints(String columnName, int columnType,
			boolean[] tableConstraints, Boolean randomAllowed, boolean nullable, int maxSize, InstanceTester tester) {
		this.name = columnName;
		this.columnType = columnType;
		this.maxSize = maxSize;
		this.tester = tester;
		
		constraints = new boolean[tableConstraints.length];
		for (int i = 0; i < constraints.length; i++) {
			constraints[i] = EntryPoint.random.nextBoolean() && tableConstraints[i];
		}
		
		//TODO remove this and fix ranges of strings
		if(columnType == Types.VARCHAR){
			for(int i = (constraints.length + 1) / 2; i < constraints.length; i++){
				constraints[i] = false;
			}
		}

		this.randomAllowed = randomAllowed && EntryPoint.random.nextBoolean();

		
		if (InstanceTester.cardinality(constraints) == 0)
			this.randomAllowed = true;

		this.nullable = nullable && EntryPoint.random.nextBoolean();
	}