Class SiteHome


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Site create​(Site site)
      Create an instance of the site class
      static java.util.List<Site> findByCluster​(int nClusterId)
      Find all sites for a given cluster
      static Site findByPrimaryKey​(int nKey)
      Returns an instance of a site whose identifier is specified in parameter
      static java.lang.String findDuplicateSite​(java.lang.String siteName, java.lang.String artifactId, java.lang.String scmUrl)
      Search if the site is already exist
      static java.util.List<java.lang.Integer> getIdSitesList()
      Load the id of all the site objects and returns them as a list
      static java.util.List<Site> getSitesList()
      Load the data of all the site objects and returns them as a list
      static fr.paris.lutece.util.ReferenceList getSitesReferenceList()
      Load the data of all the site objects and returns them as a referenceList
      static void remove​(int nKey)
      Remove the site whose identifier is specified in parameter
      static Site update​(Site site)
      Update of the site which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.util.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 java.util.List<java.lang.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 java.util.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 java.lang.String findDuplicateSite​(java.lang.String siteName,
                                                         java.lang.String artifactId,
                                                         java.lang.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