Class LibraryDao


  • public class LibraryDao
    extends AbstractDao
    Provides a DAO for the Library entity.
    Since:
    4.0.0
    • Constructor Detail

      • LibraryDao

        public LibraryDao()
    • Method Detail

      • getLibraryForPK

        public Library getLibraryForPK​(Object libraryId)
        Return the library with the specified ID
        Parameters:
        libraryId - the OID of the library (required)
        Returns:
        the matching library, or null if not found
      • getLibraryForReleaseVersion

        public Library getLibraryForReleaseVersion​(Long releaseVersionId,
                                                   String libraryName)
        Return the library for the specified name. The library must be of type Library.TYPE_RELEASE and belong to the specified release version.
        Parameters:
        releaseVersionId - the release version ID (required)
        libraryName - the name of the library (required)
        Returns:
        the library for the specified release version and name
      • getReleaseLibraryForVersionNumber

        public Library getReleaseLibraryForVersionNumber​(String versionNumber,
                                                         String libraryName)
        Return the release library for the specified library name and version number. The library must be of type Library.TYPE_RELEASE and belong to the specified release version.
        Parameters:
        versionNumber - the version number of the release version (required)
        libraryName - the name of the library (required)
        Returns:
        the library for the specified release version number and library name
        Since:
        5.0.0
      • getReleaseLibraryForVersionNumberByNormalizedName

        public Library getReleaseLibraryForVersionNumberByNormalizedName​(String versionNumber,
                                                                         String libraryNormalizedName)
        Return the release library for the specified library normalized name and version number. The library must be of type Library.TYPE_RELEASE and belong to the specified release version.
        Parameters:
        versionNumber - the version number of the release version (required)
        libraryNormalizedName - the normalized name of the library (required)
        Returns:
        the library for the specified release version number and library normalized name
        Since:
        17.10.0
      • getLibraryForClient

        public Library getLibraryForClient​(Long clientId,
                                           String libraryName)
        Deprecated.
        This method does not deterministically return a library because libraries are now also distinguished by version number. Please use getLibraryForClient(Long clientId, String libraryNormalizedName, String version) instead.
        Return the library for the specified name. The library must be of type Library.TYPE_ORGANIZATION and belong to the specified client.
        Parameters:
        clientId - the client ID (required)
        libraryName - the name of the library (required)
        Returns:
        the library for the specified client and name
      • getLibraryForClientByNormalizedName

        public Library getLibraryForClientByNormalizedName​(Long clientId,
                                                           String libraryNormalizedName)
        Deprecated.
        This method does not deterministically return a library because libraries are now also distinguished by version number. Please use getLibraryForClient(Long clientId, String libraryNormalizedName, String version) instead.
        Return the library for the specified normalized name. The library must be of type Library.TYPE_ORGANIZATION and belong to the specified client.
        Parameters:
        clientId - the client ID (required)
        libraryNormalizedName - the name of the library (required)
        Returns:
        the library for the specified client and normalized name
        Since:
        17.10.0
      • getLibraryForClient

        public Library getLibraryForClient​(Long clientId,
                                           String libraryNormalizedName,
                                           String version)
        Return the library for the specified normalized name and version. The library must be of type Library.TYPE_ORGANIZATION and belong to the specified client.
        Parameters:
        clientId - the client ID (required)
        libraryNormalizedName - the name of the library (required)
        version - the version of the library (required)
        Returns:
        the library for the specified client and normalized name
        Since:
        17.10.0
      • getLibraryForProject

        public Library getLibraryForProject​(Long projectId,
                                            String libraryName)
        Deprecated.
        This method does not deterministically return a library because libraries are now also distinguished by version number. Please use getLibraryForProject(Long projectId, String libraryNormalizedName, String version) instead.
        Return the library for the specified name. The library must be of type Library.TYPE_PROJECT and belong to the specified project.
        Parameters:
        projectId - the project ID (required)
        libraryName - the name of the library (required)
        Returns:
        the library for the specified project and name
      • getLibraryForProject

        public Library getLibraryForProject​(Long projectId,
                                            String libraryNameNorm,
                                            String version)
        Return the library for the specified project, name normalized and version. The library must be of type Library.TYPE_PROJECT and belong to the specified project.
        Parameters:
        projectId - the project ID (required)
        libraryNameNorm - the name normalized of the library (required)
        version - library version
        Returns:
        the library for the specified project, name normalized and version
        Since:
        17.10.0
      • getVersionLibraryForName

        public Library getVersionLibraryForName​(String libraryName)
        Return the library for the specified name. The library must be of type Library.TYPE_FORM_DESIGN_VERSION.
        Parameters:
        libraryName - the name of the library (required)
        Returns:
        the form design version library for the specified name
      • getLibraryList

        public List<Library> getLibraryList​(String libraryType,
                                            String parentId)
        Return a list of libraries for the given type and of the specified parent if defined.
        Parameters:
        libraryType - the type of library (required)
        parentId - the parent entity id, which owns the library when a Organization, Project or Form Design Version library (optional)
        Returns:
        the list of libraries for the given type and of the specified parent if defined