Klasse Join

java.lang.Object
com.inet.report.Join
Alle implementierten Schnittstellen:
NodeParser, com.inet.report.ReferenceHolder, Serializable

public class Join extends Object implements Serializable, com.inet.report.ReferenceHolder, NodeParser
A Join represents a connection between two tables. It is vectored and points from the source table to the target table. There are four kind of Joins: INNER, OUTER, LEFT OUTER and RIGHT OUTER. The connection will be created by one or more links between the table columns. There are six kinds of linktypes: A link between both tables will be called here as join condition. A join condition consists of two columns, a column from source table and a column from target table, and the link type.
Siehe auch:
  • Methodendetails

    • getJoinType

      public int getJoinType()
      Returns the join type of this Join. The join type defines the data linking of the both tablesources of this join.
      Gibt zurück:
      the join type of this Join.
      Seit:
      6.0
      Siehe auch:
    • setJoinType

      public void setJoinType(int newJoinType)
      Sets the join type of this Join object.
      Parameter:
      newJoinType - the new join type for this Join object.
      Seit:
      6.0
      Siehe auch:
    • getSourceAlias

      public String getSourceAlias()
      Returns the source alias name for the source tables.
      Gibt zurück:
      the alias name of the source table.
      Seit:
      6.0
    • getSourceTableSource

      public TableSource getSourceTableSource()
      Returns the TableSource Object of the source table.
      Gibt zurück:
      the TableSource Object of the source table.
      Seit:
      6.1
    • getTargetAlias

      public String getTargetAlias()
      Returns the target alias name for the source tables.
      Gibt zurück:
      the alias name of the target table.
      Seit:
      6.0
    • getTargetTableSource

      public TableSource getTargetTableSource()
      Returns the TableSource Object of the target table.
      Gibt zurück:
      the TableSource Object of the target table.
      Seit:
      6.1
    • addCondition

      public void addCondition(String sourceColumn, 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);
      Parameter:
      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.
      Löst aus:
      IllegalArgumentException - If no database field could be found for sourceColumn or targetColumn.
      Seit:
      6.0
      Siehe auch:
    • 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);
      Parameter:
      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.
      Seit:
      6.1
      Siehe auch:
    • removeCondition

      public void removeCondition(int i)
      Removes a condition from the join.
      Parameter:
      i - condition index to remove. The index of the first condition is 0.
      Löst aus:
      ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
      Seit:
      6.0
      Siehe auch:
    • getConditionCount

      public int getConditionCount()
      Returns the number of join conditions.
      Gibt zurück:
      the count of the join conditions.
      Seit:
      6.0
      Siehe auch:
    • getConditionSourceColumn

      public String getConditionSourceColumn(int i)
      Returns the column name from source table, used in the specified condition.
      Parameter:
      i - the index of the condition. The index of the first condition is 0.
      Gibt zurück:
      the column name of the source table for the respective condition.
      Löst aus:
      ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
      Seit:
      6.0
      Siehe auch:
    • getConditionTargetColumn

      public String getConditionTargetColumn(int i)
      Returns the column name from target table, used in the specified condition.
      Parameter:
      i - the index of the condition. The index of the first condition is 0.
      Gibt zurück:
      the column name of the target table for the respective condition.
      Löst aus:
      ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
      Seit:
      6.0
      Siehe auch:
    • getConditionLinkType

      public int getConditionLinkType(int i)
      Returns the link type of the specified condition.
      Parameter:
      i - the index of the condition. The index of the first condition is 0.
      Gibt zurück:
      the link type for the respective condition.
      Löst aus:
      ArrayIndexOutOfBoundsException - if the index is less than 0, greater than or equals the condition count.
      Seit:
      6.0
      Siehe auch:
    • getConditionSourceColumns

      public String[] getConditionSourceColumns()
      Returns all columns from source table, that are used for the join conditions.
      Gibt zurück:
      a String array containing all columns from source table, that are used for the join conditions.
      Seit:
      6.0
      Siehe auch:
    • getConditionSourceFields

      public DatabaseField[] getConditionSourceFields()
      Returns all fields from source table, that are used for the join conditions.
      Gibt zurück:
      a DatabaseField array containing all columns from source table, that are used for the join conditions.
      Seit:
      6.1
      Siehe auch:
    • getConditionTargetFields

      public DatabaseField[] getConditionTargetFields()
      Returns all fields from target table, that are used for the join conditions.
      Gibt zurück:
      a DatabaseField array containing all columns from target table, that are used for the join conditions.
      Seit:
      6.1
      Siehe auch:
    • getConditionTargetColumns

      public String[] getConditionTargetColumns()
      Returns all columns from target table, that are used for the join conditions.
      Gibt zurück:
      a String array containing all columns from target table, that are used for the join conditions.
      Seit:
      6.0
      Siehe auch:
    • getConditionLinkTypes

      public int[] getConditionLinkTypes()
      Returns the link types of all join conditions.
      Gibt zurück:
      an int array containing the link types of all join conditions.
      Seit:
      6.0
      Siehe auch:
    • paramString

      public String paramString()
      Returns a String representation of this Join.
      Gibt zurück:
      a String representation of this Join.
      Seit:
      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 '>'.

      Seit:
      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.

      Angegeben von:
      isDOMParser in Schnittstelle NodeParser
      Gibt zurück:
      true if this node is to be read via a DOM parser, false otherwise.
    • parseDOM

      public void parseDOM(Node node, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Parses the node.

      Angegeben von:
      parseDOM in Schnittstelle NodeParser
      Parameter:
      node - the node
      parserMap - The map of current Parser.
      Löst aus:
      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, String tag, Attributes atts, Map<String,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.

      Angegeben von:
      parseElement in Schnittstelle NodeParser
      Parameter:
      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.
      Gibt zurück:
      The NodeParser sub-element if one needed to be created, or null if none was created.
      Löst aus:
      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, String tag, Map<String,Object> parserMap) throws FatalParserException
      FOR INTERNAL USE ONLY Internal method for reading report XML

      Receive notification of the end of an XML tag.

      Angegeben von:
      parseEndElement in Schnittstelle NodeParser
      Parameter:
      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.
      Löst aus:
      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(String text, Map<String,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)

      Angegeben von:
      parseText in Schnittstelle NodeParser
      Parameter:
      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.
      Angegeben von:
      addReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
      Parameter:
      reference - the referenced object
      Seit:
      6.0
      Siehe auch:
      • 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.
      Angegeben von:
      removeReferencedObject in Schnittstelle com.inet.report.ReferenceHolder
      Parameter:
      reference - the referenced object
      Seit:
      6.0
      Siehe auch:
      • ReferenceHolder.removeReferencedObject(com.inet.report.ReferencedObject)
    • getRealReferencedObjectCount

      public final int getRealReferencedObjectCount()
      FOR INTERNAL USE ONLY
      Angegeben von:
      getRealReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
      Gibt zurück:
      the count of real referenced objects
      Seit:
      6.0
      Siehe auch:
      • ReferenceHolder.getRealReferencedObjectCount()
    • getReferencedObjectCount

      public final int getReferencedObjectCount()
      FOR INTERNAL USE ONLY Returns the number of ReferencedObjects which this object is referencing at the moment.
      Angegeben von:
      getReferencedObjectCount in Schnittstelle com.inet.report.ReferenceHolder
      Gibt zurück:
      the count of referenced objects
      Seit:
      6.0
      Siehe auch:
      • ReferenceHolder.getReferencedObjectCount()
    • getReferencedObjects

      public final com.inet.report.ReferencedObject[] getReferencedObjects()
      FOR INTERNAL USE ONLY Returns the ReferencedObjects this object is referencing currently.
      Angegeben von:
      getReferencedObjects in Schnittstelle com.inet.report.ReferenceHolder
      Gibt zurück:
      the referenced objects
      Seit:
      6.0
      Siehe auch:
      • ReferenceHolder.getReferencedObjects()
    • setReferences

      public final void setReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      setReferences in Schnittstelle com.inet.report.ReferenceHolder
      Seit:
      6.0
    • resetReferences

      public final void resetReferences()
      FOR INTERNAL USE ONLY
      Angegeben von:
      resetReferences in Schnittstelle com.inet.report.ReferenceHolder
      Seit:
      6.0