package org.ajax4jsf.bean.validation;

import org.hibernate.validator.Length;
import org.hibernate.validator.Max;
import org.hibernate.validator.Min;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;

/**
 * renamed and copied from demo
 */
public class Activity {
    public Activity(String title, Integer time) {
        setTitle(title);
        setTime(time);
    }

    @NotEmpty
    @Length(min = 3, max = 15)
    private String title;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @NotNull
    @Min(0)
    @Max(12)
    private Integer time;

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

}
