@Override
	public RestrictionHandler.Result handleRestriction(
			final AbstractQueryBuilder abstractQueryBuilder, 
			final Restriction restriction) {
		final StringBuilder builder = new StringBuilder();
		final Nullable nullable = restriction.getNullable();

		final String restrictionId = " ?" + restriction.getParameter();
		final String fieldToRestrict = restriction.getField();
		final String entityAndField = abstractQueryBuilder.getEntityAliasName() + 
				"." + fieldToRestrict;
		final Object restrictionValue = restriction.getValue();

		switch (nullable) {
			case DISCARD:
				boolean handleRestriction = false;
				if (restrictionValue instanceof String) {
					final String strValue = ((String) restrictionValue);
					handleRestriction = (!strValue.isEmpty());
				} else {
					handleRestriction = (restrictionValue != null);
				}

				if (handleRestriction) {
					builder.append(entityAndField).append(" ").
						append(this.characterComparator).
						append(restrictionId);
					return new Result(builder.toString(), true);
				} else {
					return new Result(builder.toString(), false); 
				}

			case KEEP:
				if (restrictionValue != null) {
					builder.append(entityAndField).append(" ").
						append(this.characterComparator).append(restrictionId);

					return new Result(builder.toString(), true);
				} else {
					if (restriction.getRestrictionType().equals(RestrictionType.EQUAL)) {
						builder.append(entityAndField).append(" is null");
					} else if (restriction.getRestrictionType().equals(RestrictionType.NOT_EQUAL)) {
						builder.append(entityAndField).append(" is not null");
					// Good references(just in case I'm forget):
					// http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/
					} else {
						throw new UnsupportedOperationException("Null value only for EQUAL or NOT_EQUAL.");
					}
				}

				return new Result(builder.toString(), false);

			default:
				throw new IllegalStateException("Unknown Nullable value.");
		}	
	}