Class HopFilterManager


  • public class HopFilterManager
    extends BaseTable
    This class manages the "hopfilters" table, which contains the hopcount filters for each job. It's separated from the main jobs table because we will need multiple hop filters per job.

    jobhopfilters
    FieldTypeDescription        
    owneridBIGINTReference:jobs.id
    linktypeVARCHAR(255)
    maxhopsBIGINT


    • Method Detail

      • install

        public void install​(java.lang.String ownerTable,
                            java.lang.String owningTablePrimaryKey)
                     throws ManifoldCFException
        Install or upgrade.
        Parameters:
        ownerTable - is the name of the table that owns this one.
        owningTablePrimaryKey - is the primary key of the owning table.
        Throws:
        ManifoldCFException
      • readRows

        public java.util.Map readRows​(java.lang.Long id)
                               throws ManifoldCFException
        Read rows for a given owner id.
        Parameters:
        id - is the owner id.
        Returns:
        a map of link type to max hop count (as a Long).
        Throws:
        ManifoldCFException
      • getRows

        public void getRows​(java.util.Map<java.lang.Long,​JobDescription> returnValues,
                            java.lang.String ownerIDList,
                            java.util.ArrayList ownerIDParams)
                     throws ManifoldCFException
        Fill in a set of filters corresponding to a set of owner id's.
        Parameters:
        returnValues - is a map keyed by ownerID, with value of JobDescription.
        ownerIDList - is the list of owner id's.
        ownerIDParams - is the corresponding set of owner id parameters.
        Throws:
        ManifoldCFException
      • compareRows

        public boolean compareRows​(java.lang.Long ownerID,
                                   IJobDescription list)
                            throws ManifoldCFException
        Compare a filter list against what's in a job description.
        Parameters:
        ownerID - is the owning identifier.
        list - is the job description to write hopcount filters for.
        Throws:
        ManifoldCFException
      • writeRows

        public void writeRows​(java.lang.Long ownerID,
                              IJobDescription list)
                       throws ManifoldCFException
        Write a filter list into the database.
        Parameters:
        ownerID - is the owning identifier.
        list - is the job description to write hopcount filters for.
        Throws:
        ManifoldCFException
      • deleteRows

        public void deleteRows​(java.lang.Long ownerID)
                        throws ManifoldCFException
        Delete rows.
        Parameters:
        ownerID - is the owner whose rows to delete.
        Throws:
        ManifoldCFException