Class LastByIntradayLoggerFactory

java.lang.Object
com.illumon.iris.db.tables.dataimport.LastByIntradayLoggerFactory

public class LastByIntradayLoggerFactory
extends Object
Hooks into the regular IntradayLoggerFactory to enable extra listeners and definitions to be created for each of the configured last by table formats. Relies on the XML file read by the LastByTableFactory.
  • Method Details

    • generateLogger

      public boolean generateLogger​(String loggerPackage, String namespace, String tableName, org.jdom2.Element element) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • generateTableListener

      public boolean generateTableListener​(org.jdom2.Element tableElement, String namespace, String tableName, String packageName) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • getLogParametersDeclarationForInterface

      public String getLogParametersDeclarationForInterface​(org.jdom2.Element tableDefinition, String loggerInterface)
    • getSetter

      public String getSetter​(String indent, org.jdom2.Element tableDefinition, Map<String,​?> nameToTypeMeta, String loggerInterface, String name)
    • getLogParameters

      public String getLogParameters​(org.jdom2.Element tableDefinition, String loggerInterface, boolean unboxed)
    • isLastByElement

      public static boolean isLastByElement​(org.jdom2.Element element)
      Given a Table element in the schema XML; return true if it is a last by table (based on the presence of a child element which is one of the types associated with a lastby table.
      Parameters:
      element - the table element it the XML
      Returns:
      true if this table is a last by table
    • getVirtualDefinitions

      public static Collection<? extends org.jdom2.Element> getVirtualDefinitions​(org.jdom2.Element element)
      Given a Table element in the schema XML; produce any additional schema elements required.
      Parameters:
      element - table element in the schema XML.
      Returns:
      a collection of additional virtual tables derived from this element.
    • getTableElement

      public static org.jdom2.Element getTableElement​(String namespace, String tableName)
      Given a table name, if we are synthesizing this table element; return the table element.
      Parameters:
      namespace - namespace of the virtual table element
      tableName - table name of the virtual table element
      Returns:
      our virtual table element, or null if no LastByIntradayLoggerFactory has claimed this name.