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

com.heliorm.def.LongField Maven / Gradle / Ivy

The newest version!
package com.heliorm.def;

import com.heliorm.Field;
import com.heliorm.OrmException;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * A field representing a long value
 *
 * @param  Object type
 * @author gideon
 */
public interface LongField< O> extends Field, WithRange, WithEquals, WithIn, WithIs {

    default Continuation lt(Integer value) throws OrmException {
        return lt(value.longValue());
    }

    default Continuation le(Integer value) throws OrmException {
        return le(value.longValue());
    }

    default Continuation gt(Integer value) throws OrmException {
        return gt(value.longValue());
    }

    default Continuation ge(Integer value) throws OrmException {
        return ge(value.longValue());
    }

    default Continuation eq(Integer value) throws OrmException {
        return eq(value.longValue());
    }


    default Continuation notEq(Integer value) throws OrmException {
        return notEq(value.longValue());
    }

    default Continuation in(Integer... values) throws OrmException {
        return in(Arrays.stream(values).map(Integer::longValue).collect(Collectors.toList()));
    }

    default Continuation notIn(Integer... values) throws OrmException {
        return notIn(Arrays.stream(values).map(Integer::longValue).collect(Collectors.toList()));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy