com.heliorm.impl.ByteFieldPart Maven / Gradle / Ivy
The newest version!
package com.heliorm.impl;
import com.heliorm.OrmException;
import com.heliorm.Table;
import com.heliorm.def.ByteField;
import com.heliorm.def.Continuation;
import java.util.Arrays;
import java.util.List;
/**
* @author gideon
*/
public final class ByteFieldPart extends NumberFieldPart implements ByteField {
public ByteFieldPart(Table table, String javaName) {
super(table, FieldType.BYTE, Byte.class, javaName);
}
@Override
public Continuation eq(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.EQ, value);
}
@Override
public Continuation notEq(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.NOT_EQ, value);
}
@Override
public Continuation lt(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.LT, value);
}
@Override
public Continuation le(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.LE, value);
}
@Override
public Continuation gt(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.GT, value);
}
@Override
public Continuation ge(Byte value) throws OrmException {
return new ValueExpressionPart<>(getThis(), ValueExpressionPart.Operator.GE, 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);
}
@Override
public Continuation in(List values) throws OrmException {
return new ListExpressionPart<>(getThis(), ListExpressionPart.Operator.IN, values);
}
@Override
public Continuation notIn(List values) throws OrmException {
return new ListExpressionPart<>(getThis(), ListExpressionPart.Operator.NOT_IN, values);
}
@Override
public Continuation in(Byte... values) throws OrmException {
return new ListExpressionPart<>(getThis(), ListExpressionPart.Operator.IN, Arrays.asList(values));
}
@Override
public Continuation notIn(Byte... values) throws OrmException {
return new ListExpressionPart<>(getThis(), ListExpressionPart.Operator.NOT_IN, Arrays.asList(values));
}
}