/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.navalplanner.business.resources.entities;

import java.util.List;

/**
 *
 * @author Diego Pino Garcia<dpino@igalia.com>
 */
public enum ResourceEnum {

    RESOURCE(Resource.class),
    WORKER(Worker.class);

    Class clase;

    private ResourceEnum(Class clase) {
        this.clase = clase;
    }

    public Class asClass() {
        return clase;
    }

    public static ResourceEnum getDefault() {
        return RESOURCE;
    }

    public boolean isAssignableFrom(Class clase) {
        return asClass().equals(clase);
    }
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.navalplanner.business.resources.entities;

import java.util.List;

/**
 *
 * @author Diego Pino Garcia<dpino@igalia.com>
 */
public enum ResourceEnum {

    RESOURCE(Resource.class),
    WORKER(Worker.class);

    Class clase;

    private ResourceEnum(Class clase) {
        this.clase = clase;
    }

    public Class asClass() {
        return clase;
    }

    public static ResourceEnum getDefault() {
        return RESOURCE;
    }

    public boolean isAssignableFrom(Class clase) {
        return asClass().isAssignableFrom(clase);
    }
}

Fix bug to let add a CriterionSatisfaction to Resource super class or subclass.
ItEr16S10ClasificacionTraballoItEr15S13: Fix bug to let add a CriterionSatisfaction to Resource super class or
subclass.

If a CriterionType has in the resource column an enum matching the Resource super class, it has to be possible to
assign it to a subclass of Resource (Worker).
