001/*
002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Anahide Tchertchian
018 */
019package org.nuxeo.ecm.platform.query.api;
020
021import java.io.Serializable;
022
023/**
024 * Entry wrapping selection information for given data entry
025 *
026 * @author Anahide Tchertchian
027 */
028public class PageSelection<T> implements Serializable {
029
030    private static final long serialVersionUID = 1L;
031
032    protected boolean selected;
033
034    protected T data;
035
036    public PageSelection(T data, boolean selected) {
037        this.data = data;
038        this.selected = selected;
039    }
040
041    public void setSelected(boolean selected) {
042        this.selected = selected;
043    }
044
045    public boolean isSelected() {
046        return selected;
047    }
048
049    public T getData() {
050        return data;
051    }
052
053    public void setData(T data) {
054        this.data = data;
055    }
056
057}