java.lang.Object
fr.paris.lutece.plugins.releaser.business.SiteDAO
All Implemented Interfaces:
ISiteDAO

public final class SiteDAO extends Object implements ISiteDAO
This class provides Data Access methods for Site objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    void
    insert(Site site, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    int
    newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Generates a new primary key
    searchDuplicateSite(String siteName, String artifactId, String scmUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Find if site is already exist
    selectByCluster(int nClusterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Find all sites for a given cluster
    selectIdSitesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the id of all the site objects and returns them as a list
    selectSitesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the site objects and returns them as a list
    fr.paris.lutece.util.ReferenceList
    selectSitesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the site objects and returns them as a referenceList
    void
    store(Site site, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the record in the table

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SiteDAO

      public SiteDAO()
  • Method Details

    • newPrimaryKey

      public int newPrimaryKey(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Generates a new primary key
      Parameters:
      plugin - The Plugin
      Returns:
      The new primary key
    • insert

      public void insert(Site site, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      Specified by:
      insert in interface ISiteDAO
      Parameters:
      site - instance of the Site object to insert
      plugin - the Plugin
    • load

      public Site load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data from the table
      Specified by:
      load in interface ISiteDAO
      Parameters:
      nKey - The identifier of the site
      plugin - the Plugin
      Returns:
      The instance of the site
    • delete

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface ISiteDAO
      Parameters:
      nKey - The identifier of the Site to delete
      plugin - the Plugin
    • store

      public void store(Site site, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      Specified by:
      store in interface ISiteDAO
      Parameters:
      site - the reference of the Site
      plugin - the Plugin
    • selectSitesList

      public List<Site> selectSitesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the site objects and returns them as a list
      Specified by:
      selectSitesList in interface ISiteDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the data of all the site objects
    • selectIdSitesList

      public List<Integer> selectIdSitesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the id of all the site objects and returns them as a list
      Specified by:
      selectIdSitesList in interface ISiteDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the id of all the site objects
    • selectSitesReferenceList

      public fr.paris.lutece.util.ReferenceList selectSitesReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the site objects and returns them as a referenceList
      Specified by:
      selectSitesReferenceList in interface ISiteDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The referenceList which contains the data of all the site objects
    • selectByCluster

      public List<Site> selectByCluster(int nClusterId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find all sites for a given cluster
      Specified by:
      selectByCluster in interface ISiteDAO
      Parameters:
      nClusterId - The cluster ID
      plugin - The plugin
      Returns:
      the list which contains the data of all the site objects
    • searchDuplicateSite

      public String searchDuplicateSite(String siteName, String artifactId, String scmUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find if site is already exist
      Specified by:
      searchDuplicateSite in interface ISiteDAO
      Parameters:
      siteName - The site Name
      artifactId - The artifactId of the site
      plugin - The plugin
      Returns:
      the cluster name which contains the existing site