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

org.gcube.portal.trainingmodule.persistence

## Class TrainingProjectPersistence

- java.lang.Object
- - org.gcube.portal.trainingmodule.persistence.AbstractPersistence<TrainingProject>
  - - org.gcube.portal.trainingmodule.persistence.TrainingProjectPersistence

- All Implemented Interfaces:
    Serializable, DaoUpdater<TrainingProject>, DaoViewer<TrainingProject>, JavaPersistenceHandler<TrainingProject>

      public class TrainingProjectPersistence
      extends AbstractPersistence<TrainingProject>
      implements Serializable

  The Class ReleasePersistence.
  Author:
    Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it Feb 19, 2015
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.gcube.portal.trainingmodule.persistence.AbstractPersistence

      `AbstractPersistence.SQL_ORDER`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `logger` The logger.
    `static String` | `tableName` The Constant tableName.

    - ### Fields inherited from class org.gcube.portal.trainingmodule.persistence.AbstractPersistence

      `AND, entityManagerFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrainingProjectPersistence(javax.persistence.EntityManagerFactory factory)` Instantiates a new release persistence.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<TrainingProject>` | `getTrainingProjectForInternalID(int internalID)` Gets the training project for internal ID.
    `javax.persistence.criteria.Root<TrainingProject>` | `rootFrom(javax.persistence.criteria.CriteriaQuery<Object> cq)` Root from.
    `TrainingProject` | `updateTrainingProjectInfo(TrainingProject training)` Update training project info.

    - ### Methods inherited from class org.gcube.portal.trainingmodule.persistence.AbstractPersistence

      `countItems, create, createNewManager, deleteItemByInternalId, executeCriteriaQuery, executeTypedQuery, getCriteriaBuilder, getEntityManagerFactory, getItemByKey, getItemForInternalID, getRows, getRows, getRowsFiltered, getRowsOrdered, insert, remove, removeAll, update`

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

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

- - ### Field Detail

    - #### tableName

          public static final String tableName

      The Constant tableName.

    - #### logger

          protected static org.slf4j.Logger logger

      The logger.

  - ### Constructor Detail

    - #### TrainingProjectPersistence

          public TrainingProjectPersistence(javax.persistence.EntityManagerFactory factory)

      Instantiates a new release persistence.
      Parameters:
        `factory` - the factory

  - ### Method Detail

    - #### rootFrom

          public javax.persistence.criteria.Root<TrainingProject> rootFrom(javax.persistence.criteria.CriteriaQuery<Object> cq)

      Description copied from interface: `JavaPersistenceHandler`
      Root from.
      Specified by:
        `rootFrom` in interface `JavaPersistenceHandler<TrainingProject>`
      Specified by:
        `rootFrom` in class `AbstractPersistence<TrainingProject>`
      Parameters:
        `cq` - the cq
      Returns:
        the root

    - #### getTrainingProjectForInternalID

          public List<TrainingProject> getTrainingProjectForInternalID(int internalID)
                                                                throws DatabaseServiceException

      Gets the training project for internal ID.
      Parameters:
        `internalID` - the internal ID
      Returns:
        the training project for internal ID
      Throws:
        `DatabaseServiceException` - the database service exception

    - #### updateTrainingProjectInfo

          public TrainingProject updateTrainingProjectInfo(TrainingProject training)
                                                    throws DatabaseServiceException

      Update training project info.
      Parameters:
        `training` - the training
      Returns:
        the training project
      Throws:
        `DatabaseServiceException` - the database service exception

Copyright © 2018. All Rights Reserved.