Example usage for org.apache.commons.lang3.math NumberUtils LONG_ONE

List of usage examples for org.apache.commons.lang3.math NumberUtils LONG_ONE

Introduction

In this page you can find the example usage for org.apache.commons.lang3.math NumberUtils LONG_ONE.

Prototype

Long LONG_ONE

To view the source code for org.apache.commons.lang3.math NumberUtils LONG_ONE.

Click Source Link

Document

Reusable Long constant for one.

Usage

From source file:eu.jsan.duvi.commons.conversion.bool.BooleanToLongConverter.java

@Override
public Long convertToDatabaseColumn(Boolean attribute) {
    return (attribute != null && attribute) ? NumberUtils.LONG_ONE : NumberUtils.LONG_ZERO;
}

From source file:eu.jsan.duvi.commons.conversion.bool.BooleanToLongConverter.java

@Override
public Boolean convertToEntityAttribute(Long dbData) {
    return NumberUtils.LONG_ONE.equals(dbData);
}