TrainingProjectJDBCManager (training-module-library 1.0.0-4.12.0-163223 API)
Date: 2018-07-19

org.gcube.portal.trainingmodule

## Class TrainingProjectJDBCManager

- java.lang.Object
- - org.gcube.portal.trainingmodule.TrainingProjectJDBCManager

-     public class TrainingProjectJDBCManager
      extends Object

  The Class TrainingProjectJDBCManager.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Jan 31, 2018

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.slf4j.Logger` | `logger` The Constant logger.
    `static String` | `TRAININGUNIT_TRAININGUNITQUESTIONNAIRE` The Constant TRAININGUNIT_TRAININGUNITQUESTIONNAIRE.
    `static String` | `TRAININGUNIT_TRAININGVIDEO` The Constant TRAININGUNIT_TRAININGVIDEO.
    `static String` | `TRAININGUNITQUESTIONNAIRE` The Constant TRAININGUNITQUESTIONNAIRE.
    `static String` | `TRAININGVIDEO` The Constant TRAININGVIDEO.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrainingProjectJDBCManager()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `deleteQuestionnaireForId(Long questionnaireId, String context)` Delete questionnaire for id.
    `protected int` | `deleteTrainingVideo(Long videoId, String context)` Delete training video.
    `protected List<TrainingProject>` | `selectTrainingProject(String context)` Select training project.
    `protected List<TrainingUnitQuestionnaire>` | `selectTrainingQuestionnaire(long unitId, String context)` Select training questionnaire.
    `List<ProgressPerUnit>` | `selectTrainingUnitProgress(String context, long unitId, String username, String itemId, ItemType itemType)` Select training unit progress.
    `protected List<TrainingVideo>` | `selectTrainingVideo(Long unitId, Long videoId, String context)` Select training video.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TRAININGUNITQUESTIONNAIRE

          public static final String TRAININGUNITQUESTIONNAIRE

      The Constant TRAININGUNITQUESTIONNAIRE.
      See Also:
        Constant Field Values

    - #### TRAININGUNIT_TRAININGUNITQUESTIONNAIRE

          public static final String TRAININGUNIT_TRAININGUNITQUESTIONNAIRE

      The Constant TRAININGUNIT_TRAININGUNITQUESTIONNAIRE.
      See Also:
        Constant Field Values

    - #### TRAININGUNIT_TRAININGVIDEO

          public static final String TRAININGUNIT_TRAININGVIDEO

      The Constant TRAININGUNIT_TRAININGVIDEO.
      See Also:
        Constant Field Values

    - #### TRAININGVIDEO

          public static final String TRAININGVIDEO

      The Constant TRAININGVIDEO.
      See Also:
        Constant Field Values

    - #### logger

          public static final org.slf4j.Logger logger

      The Constant logger.

  - ### Constructor Detail

    - #### TrainingProjectJDBCManager

          public TrainingProjectJDBCManager()

  - ### Method Detail

    - #### selectTrainingProject

          protected List<TrainingProject> selectTrainingProject(String context)
                                                         throws SQLException

      Select training project.
      Parameters:
        `context` - the context
      Returns:
        the list
      Throws:
        `SQLException` - the SQL exception

    - #### selectTrainingVideo

          protected List<TrainingVideo> selectTrainingVideo(Long unitId,
                                                            Long videoId,
                                                            String context)
                                                     throws SQLException

      Select training video.
      Parameters:
        `unitId` - the unit id
        `videoId` - the video id
        `context` - the context
      Returns:
        the list
      Throws:
        `SQLException` - the SQL exception

    - #### deleteTrainingVideo

          protected int deleteTrainingVideo(Long videoId,
                                            String context)
                                     throws SQLException,
                                            Exception

      Delete training video.
      Parameters:
        `videoId` - the video id
        `context` - the context
      Returns:
        the int
      Throws:
        `SQLException` - the SQL exception
        `Exception` - the exception

    - #### deleteQuestionnaireForId

          protected int deleteQuestionnaireForId(Long questionnaireId,
                                                 String context)
                                          throws SQLException,
                                                 Exception

      Delete questionnaire for id.
      Parameters:
        `questionnaireId` - the questionnaire id
        `context` - the context
      Returns:
        the int
      Throws:
        `SQLException` - the SQL exception
        `Exception` - the exception

    - #### selectTrainingQuestionnaire

          protected List<TrainingUnitQuestionnaire> selectTrainingQuestionnaire(long unitId,
                                                                                String context)
                                                                         throws SQLException

      Select training questionnaire.
      Parameters:
        `unitId` - the unit id
        `context` - the context
      Returns:
        the list
      Throws:
        `SQLException` - the SQL exception

    - #### selectTrainingUnitProgress

          public List<ProgressPerUnit> selectTrainingUnitProgress(String context,
                                                                  long unitId,
                                                                  String username,
                                                                  String itemId,
                                                                  ItemType itemType)
                                                           throws SQLException,
                                                                  Exception

      Select training unit progress.
      Parameters:
        `context` - the context
        `unitId` - the unit id
        `username` - the username
        `itemId` - the item id
        `itemType` - the item type
      Returns:
        the list
      Throws:
        `SQLException` - the SQL exception
        `Exception` - the exception

Copyright © 2018. All Rights Reserved.