Class BaseNetChangeEDIOutboundGenerator

java.lang.Object
com.onenetwork.platform.integ.edi.BaseEDIOutboundGenerator
com.onenetwork.platform.integ.edi.BaseNetChangeEDIOutboundGenerator
All Implemented Interfaces:
ModelOutboundGenerator, NetChangeOutboundGenerator

public abstract class BaseNetChangeEDIOutboundGenerator
extends BaseEDIOutboundGenerator
implements NetChangeOutboundGenerator
Base class for Outbound Interfaces which generate EDI for NetChange-based outbound.

This supports only NetChange-based outbound generation. The subclass needs to provide a no-args constructor which internally provides all params to this class' constructor, and implement the following methods BaseEDIOutboundGenerator.derivePartners(ModelOutboundProcessingContext) - to identify the Partner to be used for EDIOutboundRouting of each transaction set. getSqlDef(NetChangeOutboundProcessingContext) - to retrieve the models for which the outbound EDI needs to be generated. getModelTypeClass() - to get the class name of the model type being used to generate the outbound

  • Constructor Details

    • BaseNetChangeEDIOutboundGenerator

      protected BaseNetChangeEDIOutboundGenerator​(com.onenetwork.platform.data.model.impl.ModelType modelType, java.lang.String ediTransactionSetNo, java.lang.String ediFormat)
  • Method Details

    • getSqlDef

      public abstract SqlDef getSqlDef​(NetChangeOutboundProcessingContext processingContext)
      SqlDef to retrieve the models for which the outbound EDI needs to be generated. NOTE: SqlDef should have queries only to retrieve the sysIds and NOT the entire models. Separate calls to MDS.readById will be done to read the entire model. And Params must include $START_DATE$ and $END_DATE$ along with $VC_ID$
      Parameters:
      processingContext -
      Returns:
      SqlDef
    • getModelTypeClass

      protected abstract <T extends Model> java.lang.Class<T> getModelTypeClass()
      Method to get the class name of the model type being used to generate the outbound
      Returns:
      class name of the model
    • generate

      public void generate​(NetChangeOutboundProcessingContext processingContext)
      Combines functionality of both {@link #NetChangeOutboundGenerator.generate(com.onenetwork.platform.integ.msg.NetChangeOutboundProcessingContext)} and {@link #BaseEDIOutboundGenerator.generate(ModelOutboundProcessingContext)}
      Specified by:
      generate in interface NetChangeOutboundGenerator
      Parameters:
      processingContext - NetChangeOutboundProcessingContext context to generate outbound data
    • getModelsForOutboundProcessing

      protected java.util.List<Model> getModelsForOutboundProcessing​(NetChangeOutboundProcessingContext processingContext, java.util.List<java.lang.Long> sysIdsOfModels) throws java.lang.Exception
      ModelDataService.readByIds in order to get all the models
      Parameters:
      processingContext -
      Returns:
      List
      Throws:
      java.lang.Exception
    • getSysIdsForOutboundGeneration

      protected java.util.List<java.lang.Long> getSysIdsForOutboundGeneration​(NetChangeOutboundProcessingContext processingContext) throws java.lang.Exception
      Uses the SqlDef to get all the sysIds of the models
      Parameters:
      processingContext -
      Returns:
      List
      Throws:
      java.lang.Exception
    • populateCustomParams

      public void populateCustomParams​(SqlParams sqlParams, PlatformUserContext pltUserContext)
      Override this method if you need to use additional SqlParams as part of retrieving the models to generate outbound.
      Parameters:
      sqlParams -
      pltUserContext -