Class SqlEntityProcessor

    • Constructor Detail

      • SqlEntityProcessor

        public SqlEntityProcessor()
    • Method Detail

      • init

        public void init​(Context context)
        Description copied from class: EntityProcessor
        This method is called when it starts processing an entity. When it comes back to the entity it is called again. So it can reset anything at that point. For a rootmost entity this is called only once for an ingestion. For sub-entities , this is called multiple once for each row from its parent entity
        Overrides:
        init in class EntityProcessorBase
        Parameters:
        context - The current context
      • initQuery

        protected void initQuery​(String q)
      • nextRow

        public Map<String,​Object> nextRow()
        Description copied from class: EntityProcessorBase
        For a simple implementation, this is the only method that the sub-class should implement. This is intended to stream rows one-by-one. Return null to signal end of rows
        Overrides:
        nextRow in class EntityProcessorBase
        Returns:
        a row where the key is the name of the field and value can be any Object or a Collection of objects. Return null to signal end of rows
      • nextDeletedRowKey

        public Map<String,​Object> nextDeletedRowKey()
        Description copied from class: EntityProcessor
        This is used during delta-import. It gives the primary keys of the rows that are deleted from this entity. If this entity is the root entity, solr document is deleted. If this is a sub-entity, the Solr document is considered as 'changed' and will be recreated
        Overrides:
        nextDeletedRowKey in class EntityProcessorBase
        Returns:
        the pk vs value of all changed rows
      • nextModifiedParentRowKey

        public Map<String,​Object> nextModifiedParentRowKey()
        Description copied from class: EntityProcessor
        This is used during delta-import. This gives the primary keys and their values of all the rows changed in a parent entity due to changes in this entity.
        Overrides:
        nextModifiedParentRowKey in class EntityProcessorBase
        Returns:
        the pk vs value of all changed rows in the parent entity
      • getQuery

        public String getQuery()
      • getDeltaImportQuery

        public String getDeltaImportQuery​(String queryString)