Class ModuleProcessor


  • public class ModuleProcessor
    extends Object
    Loading and generating module. It downloads and generate the procedure code
    • Constructor Detail

      • ModuleProcessor

        public ModuleProcessor​(BasicDbObject creatingObject,
                               Module module,
                               ScriptVariant scriptVariant,
                               int insertPosition)
        Create module processor for creating object on base
        Parameters:
        creatingObject - - object for which the generation settings constructor opens,cannot be null
        module - - creating object module , cannot be null
        scriptVariant - - platform localization , cannot be null
        insertPosition - - position where the code will be inserted
      • ModuleProcessor

        public ModuleProcessor​(BasicDbObject creatingObject,
                               Module module,
                               ScriptVariant scriptVariant,
                               int insertPosition,
                               String newline)
        Create module processor for creating object on base
        Parameters:
        creatingObject - - object for which the generation settings constructor opens,cannot be null
        module - - creating object module , cannot be null
        scriptVariant - - platform localization , cannot be null
        insertPosition - - position where the code will be inserted
        newline - - line separator, cannot be null
    • Method Detail

      • getFillingFields

        public List<Fields> getFillingFields()
        Returns a collection of collections where each collection is basic-object-sensitive
        Returns:
        associative array basic object to field list, cannot be null
      • getScriptVariant

        public ScriptVariant getScriptVariant()
        Returns current script variant
        Returns:
        current script variant
      • getFillingProcedure

        public String getFillingProcedure()
        Returns filling procedure
        Returns:
        filling procedure , may return null
      • getCurRow

        public String getCurRow()
        Returns current curRow
        Returns:
        curRow
      • getExistingConstructorPartLength

        public int getExistingConstructorPartLength()
        Return existing constructor part length
        Returns:
        constructor part length
      • getPositionExistingConstructorCode

        public int getPositionExistingConstructorCode()
        Returns position existing constructor code
        Returns:
        position existing constructor code
      • insertInProcedure

        public boolean insertInProcedure()
        Check current procedure
        Returns:
        If code inserting in procedure returns true , else returns false
      • getCodeAboveInsertPosition

        public String getCodeAboveInsertPosition()
        Returns previous code from object module until position
        Returns:
        previous code, cannot be null
      • getCodeUnderInsertPosition

        public String getCodeUnderInsertPosition()
        Returns next code from object module since position
        Returns:
        next code, cannot be null
      • getFillingDataString

        public String getFillingDataString()
        Return actual variable name of filling data
        Returns:
        variable name, cannot be null
      • generateСode

        public String generateСode​(List<Fields> filledModelFields)
        Returns generated code
        Parameters:
        filledModelFields - - data from new object section, cannot be null
        Returns:
        generated code, cannot be null
      • generateСode

        public String generateСode​(List<Fields> filledModelFields,
                                   boolean addTabularSection)
        Returns generated code
        Parameters:
        filledModelFields - - data from new object section, cannot be null
        addTabularSection - - add or not tabular section initializate
        Returns:
        generated code, cannot be null
      • getProcedureName

        public String getProcedureName()
        Return procedure name
        Returns:
        procedure name,may return null
      • getReplace

        public boolean getReplace()
        Check existing constructor code
        Returns:
        If insert position in existing constuctor code returns true , else returns false