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.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LastByIntradayLoggerFactory.LastByIntradayLoggerTypeFactoryInstanceHalf
The hook methods that IntradayLoggerFactory calls while generating loggers/listeners.static interface
LastByIntradayLoggerFactory.LastByIntradayLoggerTypeFactoryStaticHalf
Not really static, but this half of the LastByIntradayLogger does not need any IntradayLoggerFactory to operate properly. -
Method Summary
Modifier and Type Method Description boolean
generateLogger(String loggerPackage, String namespace, String tableName, org.jdom2.Element element)
boolean
generateTableListener(org.jdom2.Element tableElement, String namespace, String tableName, String packageName)
String
getLogParameters(org.jdom2.Element tableDefinition, String loggerInterface, boolean unboxed)
String
getLogParametersDeclarationForInterface(org.jdom2.Element tableDefinition, String loggerInterface)
String
getSetter(String indent, org.jdom2.Element tableDefinition, Map<String,?> nameToTypeMeta, String loggerInterface, String name)
static org.jdom2.Element
getTableElement(String namespace, String tableName)
Given a table name, if we are synthesizing this table element; return the table element.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.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.
-
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
-
getSetter
-
getLogParameters
-
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
Given a table name, if we are synthesizing this table element; return the table element.- Parameters:
namespace
- namespace of the virtual table elementtableName
- table name of the virtual table element- Returns:
- our virtual table element, or null if no LastByIntradayLoggerFactory has claimed this name.
-