Example usage for org.joda.time YearMonth toInterval

List of usage examples for org.joda.time YearMonth toInterval

Introduction

In this page you can find the example usage for org.joda.time YearMonth toInterval.

Prototype

public Interval toInterval() 

Source Link

Document

Converts this object to an Interval representing the whole month.

Usage

From source file:com.excilys.ebi.bank.dao.impl.OperationDaoImpl.java

License:Apache License

private BooleanExpression addOperationYearMonthExpression(BooleanExpression predicate, QOperation operation,
        YearMonth yearMonth) {

    if (yearMonth == null)
        return predicate;
    else {// ww w  . j  a v a  2  s .co  m
        Interval range = yearMonth.toInterval();
        return predicate.and(operation.date.between(range.getStart(), range.getEnd()));
    }
}