Class SiteHome


  • public final class SiteHome
    extends Object
    This class provides instances management methods (create, find, ...) for Site objects
    • Method Detail

      • create

        public static Site create​(Site site)
        Create an instance of the site class
        Parameters:
        site - The instance of the Site which contains the informations to store
        Returns:
        The instance of site which has been created with its primary key.
      • update

        public static Site update​(Site site)
        Update of the site which is specified in parameter
        Parameters:
        site - The instance of the Site which contains the data to store
        Returns:
        The instance of the site which has been updated
      • remove

        public static void remove​(int nKey)
        Remove the site whose identifier is specified in parameter
        Parameters:
        nKey - The site Id
      • findByPrimaryKey

        public static Site findByPrimaryKey​(int nKey)
        Returns an instance of a site whose identifier is specified in parameter
        Parameters:
        nKey - The site primary key
        Returns:
        an instance of Site
      • getSitesList

        public static List<Site> getSitesList()
        Load the data of all the site objects and returns them as a list
        Returns:
        the list which contains the data of all the site objects
      • getIdSitesList

        public static List<Integer> getIdSitesList()
        Load the id of all the site objects and returns them as a list
        Returns:
        the list which contains the id of all the site objects
      • getSitesReferenceList

        public static fr.paris.lutece.util.ReferenceList getSitesReferenceList()
        Load the data of all the site objects and returns them as a referenceList
        Returns:
        the referenceList which contains the data of all the site objects
      • findByCluster

        public static List<Site> findByCluster​(int nClusterId)
        Find all sites for a given cluster
        Parameters:
        nClusterId - The cluster ID
        Returns:
        the list which contains the data of all the site objects
      • findDuplicateSite

        public static String findDuplicateSite​(String siteName,
                                               String artifactId,
                                               String scmUrl)
        Search if the site is already exist
        Parameters:
        siteName - The site name
        artifactId - The site artifacteId
        scmUrl - The site sources url
        Returns:
        the the cluster name if site exists or null otherwise