
package org.apache.syncope.core.persistence.api.dao;

import java.util.List;
import org.apache.syncope.common.lib.to.Provision;
import org.apache.syncope.core.persistence.api.entity.AnyTypeClass;
import org.apache.syncope.core.persistence.api.entity.ExternalResource;
import org.apache.syncope.core.persistence.api.entity.Implementation;
import org.apache.syncope.core.persistence.api.entity.policy.Policy;

public interface ExternalResourceDAO extends DAO<ExternalResource> {

    int count();

    ExternalResource find(String key);

    ExternalResource authFind(String key);

    List<Provision> findProvisionsByAuxClass(AnyTypeClass anyTypeClass);

    boolean anyItemHaving(Implementation transformer);

    List<ExternalResource> findByProvisionSorter(Implementation provisionSorter);

    List<ExternalResource> findByPropagationActions(Implementation propagationActions);

    List<ExternalResource> findByPolicy(Policy policy);

    List<ExternalResource> findAll();

    ExternalResource save(ExternalResource resource);

    void deleteMapping(String schemaName);

    void delete(String key);
}
