Class Join

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCondition​(DatabaseField sourceColumn, DatabaseField targetColumn, int linkType)
      Adds a join condition to this Join Object.
      void addCondition​(java.lang.String sourceColumn, java.lang.String targetColumn, int linkType)
      Adds a join condition to this Join Object.
      void addReferencedObject​(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY Adds a ReferencedObject to the list of objects which this object is referencing.
      int getConditionCount()
      Returns the number of join conditions.
      int getConditionLinkType​(int i)
      Returns the link type of the specified condition.
      int[] getConditionLinkTypes()
      Returns the link types of all join conditions.
      java.lang.String getConditionSourceColumn​(int i)
      Returns the column name from source table, used in the specified condition.
      java.lang.String[] getConditionSourceColumns()
      Returns all columns from source table, that are used for the join conditions.
      DatabaseField[] getConditionSourceFields()
      Returns all fields from source table, that are used for the join conditions.
      java.lang.String getConditionTargetColumn​(int i)
      Returns the column name from target table, used in the specified condition.
      java.lang.String[] getConditionTargetColumns()
      Returns all columns from target table, that are used for the join conditions.
      DatabaseField[] getConditionTargetFields()
      Returns all fields from target table, that are used for the join conditions.
      int getJoinType()
      Returns the join type of this Join.
      int getRealReferencedObjectCount()
      FOR INTERNAL USE ONLY
      int getReferencedObjectCount()
      FOR INTERNAL USE ONLY Returns the number of ReferencedObjects which this object is referencing at the moment.
      com.inet.report.ReferencedObject[] getReferencedObjects()
      FOR INTERNAL USE ONLY Returns the ReferencedObjects this object is referencing currently.
      java.lang.String getSourceAlias()
      Returns the source alias name for the source tables.
      TableSource getSourceTableSource()
      Returns the TableSource Object of the source table.
      java.lang.String getTargetAlias()
      Returns the target alias name for the source tables.
      TableSource getTargetTableSource()
      Returns the TableSource Object of the target table.
      boolean isDOMParser()
      FOR INTERNAL USE ONLY Internal method for reading report XML
      java.lang.String paramString()
      Returns a String representation of this Join.
      void parseDOM​(org.w3c.dom.Node node, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      NodeParser parseElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, org.xml.sax.Attributes atts, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseEndElement​(com.inet.report.parser.XMLTag group, java.lang.String tag, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void parseText​(java.lang.String text, java.util.Map<java.lang.String,​java.lang.Object> parserMap)
      FOR INTERNAL USE ONLY Internal method for reading report XML
      void removeCondition​(int i)
      Removes a condition from the join.
      void removeReferencedObject​(com.inet.report.ReferencedObject reference)
      FOR INTERNAL USE ONLY Removes a ReferencedObject from the list of objects which this object is referencing.
      void resetReferences()
      FOR INTERNAL USE ONLY
      void setJoinType​(int newJoinType)
      Sets the join type of this Join object.
      void setReferences()
      FOR INTERNAL USE ONLY
      void swapJoin()
      Inverses the join by swapping the source and target table, and changes the join type and link to make the inverted join equivalent to the current join.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSourceAlias

        public java.lang.String getSourceAlias()
        Returns the source alias name for the source tables.
        Returns:
        the alias name of the source table.
        Since:
        6.0
      • getSourceTableSource

        public TableSource getSourceTableSource()
        Returns the TableSource Object of the source table.
        Returns:
        the TableSource Object of the source table.
        Since:
        6.1
      • getTargetAlias

        public java.lang.String getTargetAlias()
        Returns the target alias name for the source tables.
        Returns:
        the alias name of the target table.
        Since:
        6.0
      • getTargetTableSource

        public TableSource getTargetTableSource()
        Returns the TableSource Object of the target table.
        Returns:
        the TableSource Object of the target table.
        Since:
        6.1
      • addCondition

        public void addCondition​(java.lang.String sourceColumn,
                                 java.lang.String targetColumn,
                                 int linkType)
        Adds a join condition to this Join Object. A join condition consists of two columns, one column of source table and one column of target table, and the column link.
        example:
        join.addCondition("orderId","orderId",DatabaseTables.JOINLINK_GREATER_THAN);
        Parameters:
        sourceColumn - the column name of the source table that is used in this condition.
        targetColumn - the column name of the target table that is used in this condition.
        linkType - the link type with that both columns are linked together.
        Throws:
        java.lang.IllegalArgumentException - If no database field could be found for sourceColumn or targetColumn.
        Since:
        6.0
        See Also:
        removeCondition(int)
      • addCondition

        public void addCondition​(DatabaseField sourceColumn,
                                 DatabaseField targetColumn,
                                 int linkType)
        Adds a join condition to this Join Object. A join condition consists of two columns, one column of source table and one column of target table, and the column link.
        example:

        join.addCondition(sourceTableSource.getDatabaseField("orderId"),targetTableSource.getDatabaseField("orderId"),DatabaseTables.JOINLINK_GREATER_THAN);
        Parameters:
        sourceColumn - the column of the source table that is used in this condition.
        targetColumn - the column of the target table that is used in this condition.
        linkType - the link type with that both columns are linked together.
        Since:
        6.1
        See Also:
        removeCondition(int)
      • removeCondition

        public void removeCondition​(int i)
        Removes a condition from the join.
        Parameters:
        i - condition index to remove. The index of the first condition is 0.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
        Since:
        6.0
        See Also:
        addCondition(String, String, int), getConditionCount()
      • getConditionSourceColumn

        public java.lang.String getConditionSourceColumn​(int i)
        Returns the column name from source table, used in the specified condition.
        Parameters:
        i - the index of the condition. The index of the first condition is 0.
        Returns:
        the column name of the source table for the respective condition.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
        Since:
        6.0
        See Also:
        getConditionCount(), getConditionTargetColumn(int), getConditionLinkType(int)
      • getConditionTargetColumn

        public java.lang.String getConditionTargetColumn​(int i)
        Returns the column name from target table, used in the specified condition.
        Parameters:
        i - the index of the condition. The index of the first condition is 0.
        Returns:
        the column name of the target table for the respective condition.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
        Since:
        6.0
        See Also:
        getConditionCount(), getConditionSourceColumn(int), getConditionLinkType(int)
      • getConditionLinkType

        public int getConditionLinkType​(int i)
        Returns the link type of the specified condition.
        Parameters:
        i - the index of the condition. The index of the first condition is 0.
        Returns:
        the link type for the respective condition.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
        Since:
        6.0
        See Also:
        getConditionCount(), getConditionTargetColumn(int), getConditionSourceColumn(int)
      • getConditionSourceColumns

        public java.lang.String[] getConditionSourceColumns()
        Returns all columns from source table, that are used for the join conditions.
        Returns:
        a String array containing all columns from source table, that are used for the join conditions.
        Since:
        6.0
        See Also:
        getConditionTargetColumns(), getConditionLinkTypes()
      • getConditionSourceFields

        public DatabaseField[] getConditionSourceFields()
        Returns all fields from source table, that are used for the join conditions.
        Returns:
        a DatabaseField array containing all columns from source table, that are used for the join conditions.
        Since:
        6.1
        See Also:
        getConditionTargetColumns(), getConditionLinkTypes()
      • getConditionTargetFields

        public DatabaseField[] getConditionTargetFields()
        Returns all fields from target table, that are used for the join conditions.
        Returns:
        a DatabaseField array containing all columns from target table, that are used for the join conditions.
        Since:
        6.1
        See Also:
        getConditionSourceColumns(), getConditionLinkTypes()
      • getConditionTargetColumns

        public java.lang.String[] getConditionTargetColumns()
        Returns all columns from target table, that are used for the join conditions.
        Returns:
        a String array containing all columns from target table, that are used for the join conditions.
        Since:
        6.0
        See Also:
        getConditionSourceColumns(), getConditionLinkTypes()
      • paramString

        public java.lang.String paramString()
        Returns a String representation of this Join.
        Returns:
        a String representation of this Join.
        Since:
        6.0
      • swapJoin

        public void swapJoin()
        Inverses the join by swapping the source and target table, and changes the join type and link to make the inverted join equivalent to the current join.

        For instance, an right join from A to B with link type '<' will become an left join from B to A with link type '>'.

        Since:
        15.0
      • isDOMParser

        public boolean isDOMParser()
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Returns whether this node is to be read via a DOM parser.

        Specified by:
        isDOMParser in interface NodeParser
        Returns:
        true if this node is to be read via a DOM parser, false otherwise.
      • parseDOM

        public void parseDOM​(org.w3c.dom.Node node,
                             java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                      throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses the node.

        Specified by:
        parseDOM in interface NodeParser
        Parameters:
        node - the node
        parserMap - The map of current Parser.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • parseElement

        public NodeParser parseElement​(com.inet.report.parser.XMLTag group,
                                       java.lang.String tag,
                                       org.xml.sax.Attributes atts,
                                       java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                                throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

        Specified by:
        parseElement in interface NodeParser
        Parameters:
        group - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.
        tag - The XMLTag to be parsed
        atts - The set of attributes in the current XMLTag
        parserMap - The map of current Parser.
        Returns:
        The NodeParser sub-element if one needed to be created, or null if none was created.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • parseEndElement

        public void parseEndElement​(com.inet.report.parser.XMLTag group,
                                    java.lang.String tag,
                                    java.util.Map<java.lang.String,​java.lang.Object> parserMap)
                             throws FatalParserException
        FOR INTERNAL USE ONLY Internal method for reading report XML

        Receive notification of the end of an XML tag.

        Specified by:
        parseEndElement in interface NodeParser
        Parameters:
        group - XMLTag of the current node to be parsed, or null if there is no such current group.
        tag - The XMLTag to be parsed
        parserMap - The map of current Parser.
        Throws:
        FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the reading of the report.
      • parseText

        public void parseText​(java.lang.String text,
                              java.util.Map<java.lang.String,​java.lang.Object> parserMap)
        FOR INTERNAL USE ONLY Internal method for reading report XML

        This method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)

        Specified by:
        parseText in interface NodeParser
        Parameters:
        text - text encountered and to be stored
        parserMap - The map of current Parser.
      • addReferencedObject

        public final void addReferencedObject​(com.inet.report.ReferencedObject reference)
        FOR INTERNAL USE ONLY Adds a ReferencedObject to the list of objects which this object is referencing.
        Specified by:
        addReferencedObject in interface com.inet.report.ReferenceHolder
        Parameters:
        reference - the referenced object
        Since:
        6.0
        See Also:
        ReferenceHolder.addReferencedObject(com.inet.report.ReferencedObject)
      • removeReferencedObject

        public final void removeReferencedObject​(com.inet.report.ReferencedObject reference)
        FOR INTERNAL USE ONLY Removes a ReferencedObject from the list of objects which this object is referencing.
        Specified by:
        removeReferencedObject in interface com.inet.report.ReferenceHolder
        Parameters:
        reference - the referenced object
        Since:
        6.0
        See Also:
        ReferenceHolder.removeReferencedObject(com.inet.report.ReferencedObject)
      • getRealReferencedObjectCount

        public final int getRealReferencedObjectCount()
        FOR INTERNAL USE ONLY
        Specified by:
        getRealReferencedObjectCount in interface com.inet.report.ReferenceHolder
        Returns:
        the count of real referenced objects
        Since:
        6.0
        See Also:
        ReferenceHolder.getRealReferencedObjectCount()
      • getReferencedObjectCount

        public final int getReferencedObjectCount()
        FOR INTERNAL USE ONLY Returns the number of ReferencedObjects which this object is referencing at the moment.
        Specified by:
        getReferencedObjectCount in interface com.inet.report.ReferenceHolder
        Returns:
        the count of referenced objects
        Since:
        6.0
        See Also:
        ReferenceHolder.getReferencedObjectCount()
      • getReferencedObjects

        public final com.inet.report.ReferencedObject[] getReferencedObjects()
        FOR INTERNAL USE ONLY Returns the ReferencedObjects this object is referencing currently.
        Specified by:
        getReferencedObjects in interface com.inet.report.ReferenceHolder
        Returns:
        the referenced objects
        Since:
        6.0
        See Also:
        ReferenceHolder.getReferencedObjects()
      • setReferences

        public final void setReferences()
        FOR INTERNAL USE ONLY
        Specified by:
        setReferences in interface com.inet.report.ReferenceHolder
        Since:
        6.0
      • resetReferences

        public final void resetReferences()
        FOR INTERNAL USE ONLY
        Specified by:
        resetReferences in interface com.inet.report.ReferenceHolder
        Since:
        6.0