All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.heliorm.impl.BooleanFieldPart Maven / Gradle / Ivy

The newest version!
package com.heliorm.impl;

import com.heliorm.OrmException;
import com.heliorm.Table;
import com.heliorm.def.BooleanField;
import com.heliorm.def.Continuation;

/**
 * @author gideon
 */
public final class BooleanFieldPart extends FieldPart implements
        BooleanField,
        WithEqualsPart, WithIsPart {

    public BooleanFieldPart(Table table, String javaName) {
        super(table, FieldType.BOOLEAN, Boolean.class, javaName);
    }

    @Override
    public Continuation eq(Boolean value) throws OrmException {
        return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.EQ, value);
    }

    @Override
    public Continuation notEq(Boolean value) throws OrmException {
        return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.NOT_EQ, value);
    }

    @Override
    public Continuation isNull() throws OrmException {
        return new IsExpressionPart<>(getThis(), IsExpressionPart.Operator.IS_NULL);
    }

    @Override
    public Continuation isNotNull() throws OrmException {
        return new IsExpressionPart<>(getThis(), IsExpressionPart.Operator.IS_NOT_NULL);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy