/*
 * Copyright (c) 2011, Patrik Dufresne. All rights reserved.
 * Patrik Dufresne PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.planimod.ui.databinding.manager;

import org.eclipse.core.databinding.observable.set.IObservableSet;

import com.patrikdufresne.managers.databinding.ArchivableObjectComputedSet;
import com.patrikdufresne.managers.databinding.ManagedObjectComputedSet;
import com.planimod.core.Employee;
import com.planimod.core.EmployeePreference;
import com.planimod.core.PlanimodManagers;
import com.planimod.core.Position;
import com.planimod.core.Product;
import com.planimod.core.Section;
import com.planimod.core.Team;

/**
 * Utility class to create computed set for managed object.
 * 
 * @author Patrik Dufresne
 * 
 */
public class PlanimodObservables {

	/**
	 * List employees.
	 * 
	 * @param managers
	 *            the managers
	 * @return the observable computedset
	 */
	public static ManagedObjectComputedSet listEmployees(
			PlanimodManagers managers) {
		return new ManagedObjectComputedSet(managers, Employee.class);
	}

	/**
	 * List positions.
	 * 
	 * @param managers
	 *            the managers
	 * @return the observable computedset
	 */
	public static ManagedObjectComputedSet listPosition(
			PlanimodManagers managers) {
		return new ManagedObjectComputedSet(managers, Position.class);
	}

	/**
	 * List employees.
	 * 
	 * @param managers
	 *            the managers
	 * @return the observable computedset
	 */
	public static ManagedObjectComputedSet listProduct(PlanimodManagers managers) {
		return new ManagedObjectComputedSet(managers, Product.class);
	}

	/**
	 * List sections.
	 * 
	 * @param managers
	 *            the managers
	 * @return the observable computedset
	 */
	public static ManagedObjectComputedSet listSection(PlanimodManagers managers) {
		return new ManagedObjectComputedSet(managers, Section.class);
	}

	/**
	 * List teams.
	 * 
	 * @param managers
	 *            the managers
	 * @return the observable computedset
	 */
	public static ManagedObjectComputedSet listTeam(PlanimodManagers managers) {
		return new ManagedObjectComputedSet(managers, Team.class);
	}

}
