Class DataTransferHome

java.lang.Object
ecmwf.web.home.ModelHomeBase
ecmwf.ecpds.master.plugin.http.home.transfer.DataTransferHome

public class DataTransferHome extends ecmwf.web.home.ModelHomeBase
The Class DataTransferHome.
  • Field Details

  • Constructor Details

    • DataTransferHome

      public DataTransferHome()
  • Method Details

    • create

      public static final DataTransfer create() throws TransferException
      Creates the.
      Returns:
      the data transfer
      Throws:
      TransferException - the transfer exception
    • findByPrimaryKey

      public static final DataTransfer findByPrimaryKey(String key) throws TransferException
      Find by primary key.
      Parameters:
      key - the key
      Returns:
      the data transfer
      Throws:
      TransferException - the transfer exception
    • findAll

      public static final Collection<DataTransfer> findAll() throws TransferException
      Find all.
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationAndDate

      public static final Collection<DataTransfer> findByDestinationAndDate(Destination d, Date date) throws TransferException
      Find by destination and date.
      Parameters:
      d - the d
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationAndTransmissionDate

      public static final Collection<DataTransfer> findByDestinationAndTransmissionDate(Destination d, Date date) throws TransferException
      Find by destination and transmission date.
      Parameters:
      d - the d
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationProductAndTime

      public static final Collection<DataTransfer> findByDestinationProductAndTime(Destination d, String product, String time) throws TransferException
      Find by destination product and time.
      Parameters:
      d - the d
      product - the product
      time - the time
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationProductAndTimeOnDate

      public static final Collection<DataTransfer> findByDestinationProductAndTimeOnDate(Destination d, String product, String time, Date date) throws TransferException
      Find by destination product and time on date.
      Parameters:
      d - the d
      product - the product
      time - the time
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationNameProductAndTimeOnDate

      public static final Collection<DataTransfer> findByDestinationNameProductAndTimeOnDate(String dname, String product, String time, Date date) throws TransferException
      Find by destination name product and time on date.
      Parameters:
      dname - the dname
      product - the product
      time - the time
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • getNotDoneTransferCount

      public static final int getNotDoneTransferCount(String dname, String product, String time, Date date) throws TransferException
      Gets the not done transfer count.
      Parameters:
      dname - the dname
      product - the product
      time - the time
      date - the date
      Returns:
      the not done transfer count
      Throws:
      TransferException - the transfer exception
    • findByHostAndDate

      public static final Collection<DataTransferLightBean> findByHostAndDate(Host h, Date date) throws TransferException
      Find by host and date.
      Parameters:
      h - the h
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDataFile

      public static final Collection<DataTransfer> findByDataFile(DataFile d, boolean includeDeleted) throws TransferException
      Find by data file.
      Parameters:
      d - the d
      includeDeleted - the include deleted
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByTransferServerOnDate

      public static final Collection<DataTransfer> findByTransferServerOnDate(TransferServer s, Date date) throws TransferException
      Find by transfer server on date.
      Parameters:
      s - the s
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByStatusIdAndDate

      public static final Collection<DataTransfer> findByStatusIdAndDate(String id, Date d, String search, String type, DataBaseCursor cursor) throws TransferException
      Find by status id and date.
      Parameters:
      id - the id
      d - the d
      search - the search
      type - the type
      cursor - the cursor
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByDestinationAndIdentity

      public static final Collection<DataTransfer> findByDestinationAndIdentity(String destination, String identity) throws TransferException
      Get DataTransfers for a destination which match a given file name. The idea is to see older data transfers for a given data file. Since the data files are created every day, there is nothing such as "the same file", so the transfers need to be identified by the file name, which could be the same, though there is NO WARRANTY of that. The problem could happen after a rename of the files.
      Parameters:
      destination - The destination to where the transfers belong.
      identity - the identity
      Returns:
      A Collection of DataTransfers
      Throws:
      TransferException - If anything fails while searching.
    • findByFilter

      public static final Collection<DataTransferLightBean> findByFilter(String destinationName, String disseminationStream, String dataStream, String dataTime, String status, boolean hasAccess, String fileName, Date date, DataBaseCursor cursor) throws TransferException
      Find by filter.
      Parameters:
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      hasAccess - the has access
      fileName - the file name
      date - the date
      cursor - the cursor
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • findByFilter

      public static final Collection<DataTransferLightBean> findByFilter(String destinationName, String disseminationStream, String dataStream, String dataTime, String status, boolean hasAccess, String fileName, Date date) throws TransferException
      Find by filter.
      Parameters:
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      hasAccess - the has access
      fileName - the file name
      date - the date
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • getCountByFilter

      public static final Collection<ecmwf.web.util.bean.Pair> getCountByFilter(String countOfWhat, String destinationName, String disseminationStream, String dataStream, String dataTime, String status, String fileNameSearch, Date date) throws TransferException
      Gets the count by filter.
      Parameters:
      countOfWhat - the count of what
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      fileNameSearch - the file name search
      date - the date
      Returns:
      the count by filter
      Throws:
      TransferException - the transfer exception
    • getCountByFilterForNonPrivilegedUsers

      public static final Collection<ecmwf.web.util.bean.Pair> getCountByFilterForNonPrivilegedUsers(String countOfWhat, String destinationName, String disseminationStream, String dataStream, String dataTime, String status, String fileNameSearch, Date date) throws TransferException
      Gets the count by filter for non privileged users.
      Parameters:
      countOfWhat - the count of what
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      fileNameSearch - the file name search
      date - the date
      Returns:
      the count by filter for non privileged users
      Throws:
      TransferException - the transfer exception
    • getCountByFilter

      public static final Collection<ecmwf.web.util.bean.Pair> getCountByFilter(String countOfWhat, String destinationName, String disseminationStream, String dataStream, String dataTime, String status, String fileNameSearch) throws TransferException
      Gets the count by filter.
      Parameters:
      countOfWhat - the count of what
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      fileNameSearch - the file name search
      Returns:
      the count by filter
      Throws:
      TransferException - the transfer exception
    • getCountByFilterForNonPrivilegedUsers

      public static final Collection<ecmwf.web.util.bean.Pair> getCountByFilterForNonPrivilegedUsers(String countOfWhat, String destinationName, String disseminationStream, String dataStream, String dataTime, String status, String fileNameSearch) throws TransferException
      Gets the count by filter for non privileged users.
      Parameters:
      countOfWhat - the count of what
      destinationName - the destination name
      disseminationStream - the dissemination stream
      dataStream - the data stream
      dataTime - the data time
      status - the status
      fileNameSearch - the file name search
      Returns:
      the count by filter for non privileged users
      Throws:
      TransferException - the transfer exception
    • findBadByDestination

      public static final Collection<DataTransfer> findBadByDestination(Destination d) throws TransferException
      Find bad by destination.
      Parameters:
      d - the d
      Returns:
      Collection of transfers (any day) which are deemed as problematic for this destination.
      Throws:
      TransferException - the transfer exception
    • findBadCountByDestination

      public static final int findBadCountByDestination(Destination d) throws TransferException
      Find bad count by destination.
      Parameters:
      d - the d
      Returns:
      the int
      Throws:
      TransferException - the transfer exception
    • find

      public static final Collection find(ecmwf.web.model.ModelSearch search) throws TransferException
      Find.
      Parameters:
      search - the search
      Returns:
      the collection
      Throws:
      TransferException - the transfer exception
    • getDefaultSearch

      public static final ecmwf.web.model.ModelSearch getDefaultSearch(String s)
      Gets the default search.
      Parameters:
      s - the s
      Returns:
      the default search