Hibernate Criteria using restrictions
===

I have an entity as

    public class CommissionSummary {    
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column(length = 100)
        private String advisorCode;
        @Column(length = 100)
        private String advisorName;
        private String advisorCodeParent;
        @Column(length = 100)
        private String advisorNameParent;
        @Column(length = 100)
        private String advisorPost;
        @Column
        private Double percentage;
        @Column
        private Double diffPercentage;
        @Column
        private Double saleAmount;
        @Column
        private Long saleCount;
        @Column
        **private Double commissionAmount;
        @Column
        private Integer month;
        @Column
        private Integer year;**
        //Getter Setter
    }

On screen user is entering criteria to fetch the date between 2 dates.

Ex. From 01/Jan/2012 till 30/Jul/2012.

In CommissionSummary entity does not have date column, but it has month and year 2 separate columns.

I want to fetch CommissionSummary records for the period from date and to date given by user, based on month and year column.

So how to achieve this using Hibernate Criteria / Restrictions? 

Note: Day field does not have any sense in user inputted from and to date.