001/*
002 *  Copyright 2025 Anyware Services
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 */
016package org.ametys.plugins.odfsync.apogee;
017
018import java.util.List;
019import java.util.Map;
020
021/**
022 * Data access object to the remote DB Apogee
023 */
024public class ApogeePreviousYearsFieldsDAO extends AbstractApogeeDAO
025{
026    /** Avalon ROLE */
027    public static final String ROLE = ApogeePreviousYearsFieldsDAO.class.getName();
028
029    /**
030     * Returns the number of students in a container for a given year
031     * @param dataSourceId The id of data source. Can not be null.
032     * @param sccParams the parameters values of the synchronizable collection
033     * @param params The parameters for search criteria: Program ID
034     * @return The number of students in the container for the given year
035     */
036    public List<Map<String, Object>> getNbStudentYear(String dataSourceId, Map<String, Object> sccParams, Map<String, Object> params)
037    {
038        return _executeSearch(dataSourceId, sccParams, params, "ApogeePreviousYears.getNbStudentYear");
039    }
040    
041    /**
042     * Returns the number of groups in a course part for a given year
043     * @param dataSourceId The id of data source. Can not be null.
044     * @param sccParams the parameters values of the synchronizable collection
045     * @param params The parameters for search criteria: Program ID
046     * @return The number of groups in the course part for the given year
047     */
048    public List<Map<String, Object>> getGroupsYear(String dataSourceId, Map<String, Object> sccParams, Map<String, Object> params)
049    {
050        return _executeSearch(dataSourceId, sccParams, params, "ApogeePreviousYears.getGroupsYear");
051    }
052}