Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.operator
Class JoinByKey

    java.lang.Object
      edu.udo.cs.miningmart.operator.ExecutableOperator
          edu.udo.cs.miningmart.operator.ConceptOperator
              edu.udo.cs.miningmart.operator.SingleCSOperator
                  edu.udo.cs.miningmart.operator.JoinByKey

public class JoinByKey
extends SingleCSOperator

This operator joins several concepts using their specified keys. The output is one concept.

Version:
  $Id: JoinByKey.java,v 1.4 2006/04/11 14:10:12 euler Exp $
Author:
  Timm Euler

Field Summary

Fields inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
`generatedSQLDefinitions`

Constructor Summary
`JoinByKey()`

Method Summary
`protected java.lang.String` | `createMetadataForOneBA(BaseAttribute inBA, BaseAttribute outBA, Columnset csForOutputConcept, java.lang.String columnExpr)` Overrides the superclass method because here a mapping is used.
`protected java.lang.String` | `generateColumns(Columnset csForOutputConcept)` This method is overridden because the copying of columns from input to output concept works differently for this operator.
`java.lang.String` | `generateSQLDefinition(java.lang.String selectPart)` This method must return the SQL definition of the newly created ColumnSet.
`protected Feature[][]` | `getInOutMap()` Getter method for the mapping parameters.
`Concept` | `getInputConcept()` This method overrides the superclass method, so that it can still be used, although this operator has more than one input concept.
`protected Concept[]` | `getSortedConcepts()` Gets the parameters "TheConcepts".
`protected BaseAttribute[]` | `getSortedKeys()` Gets the primary keys of TheConcepts.
`java.lang.String` | `getTypeOfNewColumnSet()` This method must return the entry String for the M4 table "Columnset_t", indicating whether the new Columnset is a view or a table.
`void` | `load(Step st)` Loads all parameters for this operator.
`protected boolean` | `mustCopyFeature(java.lang.String nameOfFeature)` This method is for operators that do not copy all Features of the input concept to the output concept.
`protected void` | `setNewCSMultiStepBranch(Columnset newCS, int index)` MultiStepBranch information of all Concepts need to be merged.

Methods inherited from class edu.udo.cs.miningmart.operator.SingleCSOperator
`generateColumnSetsForOp, generateSQLDefinition, getNewCSName, getTypeOfNewColumnSet`

Methods inherited from class edu.udo.cs.miningmart.operator.ConceptOperator
`compileStatement, createMetadata, createSingleColumnSet, createStatement, estimateStatistics, getNewCSName, getOutputConcept, getStringForSelection`

Methods inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
`autoPrint, checkConditions, doPrint, doPrint, execute, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getArtificalColumnName, getBusinessDbms, getHighestLoopNr, getM4Db, getM4Dbms, getM4ObjectFromCache, getName, getNextM4SequenceValue, getNumberOfLoops, getOperator, getOpParamsIterator, getParameter, getParameter, getSingleParameter, getSingleParameter, getStep, handleAssertions, isDeselectedParameter, isLoopable, isManual, isStepable, print, putM4ObjectToCache, showCreateStatement, storedProceduresAvailable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JoinByKey

    public JoinByKey()

Method Detail

### getTypeOfNewColumnSet

    public java.lang.String getTypeOfNewColumnSet()

  Description copied from class: `SingleCSOperator`
  This method must return the entry String for the M4 table "Columnset_t", indicating whether the new Columnset is a view or a table.

  Specified by:
    `getTypeOfNewColumnSet` in class `SingleCSOperator`
  Returns:
    The type of the new Columnset, either "V" or "T".
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.SingleCSOperator#getTypeOfNewColumnSet()`

### generateSQLDefinition

    public java.lang.String generateSQLDefinition(java.lang.String selectPart)
                                           throws M4CompilerError

  Description copied from class: `SingleCSOperator`
  This method must return the SQL definition of the newly created ColumnSet.

  Specified by:
    `generateSQLDefinition` in class `SingleCSOperator`
  Parameters:
    `selectPart` - The SQL string between "SELECT" and "FROM" for the SQL definition to be returned.
  Returns:
    The SQL definition for the new ColumnSet.
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.SingleCSOperator#generateSQLDefinition(String)`

### generateColumns

    protected java.lang.String generateColumns(Columnset csForOutputConcept)
                                        throws M4CompilerError

  This method is overridden because the copying of columns from input to output concept works differently for this operator.

  Overrides:
    `generateColumns` in class `ConceptOperator`
  Parameters:
    `csForOutputConcept` - The ColumnSet for which Columns are to be produced.
  Returns:
    A String for the "SELECT"-part of the view definition for the given ColumnSet.
  Throws:
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator(Columnset)`

### createMetadataForOneBA

    protected java.lang.String createMetadataForOneBA(BaseAttribute inBA,
                                                      BaseAttribute outBA,
                                                      Columnset csForOutputConcept,
                                                      java.lang.String columnExpr)
                                               throws M4CompilerError

  Overrides the superclass method because here a mapping is used.

  Overrides:
    `createMetadataForOneBA` in class `ConceptOperator`
  Parameters:
    `inBA` - A BaseAttribute from the input concept
    `outBA` - The corresponding BaseAttribute from the output concept
    `csForOutputConcept` - The current Columnset from the output concept
  Returns:
    An extended String for the Select part of the SQL statement
  Throws:
    `M4CompilerError`
  See Also:
    `miningmart.compiler.operator.ConceptOperator#createMetadataForOneBA(BaseAttribute,BaseAttribute,Columnset,String)`

### setNewCSMultiStepBranch

    protected void setNewCSMultiStepBranch(Columnset newCS,
                                           int index)
                                    throws M4CompilerError

  MultiStepBranch information of all Concepts need to be merged. In order to reduce the risk of different permutations of entries, which might be problematic with the current implementation of the `Unsegment` operator, the MultiStepBranch-`String`s of all `Columnset`s are sorted before merging them. Multiple occurences of the same attribute are not supported; after the first occurence of an attribute each further occurence is removed.

  Overrides:
    `setNewCSMultiStepBranch` in class `ConceptOperator`
  Parameters:
    `newCS` - the Columnset that is created by this operator
    `index` - An index for MulipleCSOperators.
  Throws:
    `M4CompilerError`
  See Also:
    `ConceptOperator.setNewCSMultiStepBranch(Columnset, int)`, `ConceptOperator.createSingleColumnSet(int)`

### getInputConcept

    public Concept getInputConcept()

  This method overrides the superclass method, so that it can still be used, although this operator has more than one input concept.

  Overrides:
    `getInputConcept` in class `ConceptOperator`

### mustCopyFeature

    protected boolean mustCopyFeature(java.lang.String nameOfFeature)

  Description copied from class: `ConceptOperator`
  This method is for operators that do not copy all Features of the input concept to the output concept.

  Specified by:
    `mustCopyFeature` in class `ConceptOperator`
  Parameters:
    `nameOfFeature` - Name of the feature in question.
  Returns:
    TRUE if this feature should be copied to the output concept, FALSE if not.
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#mustCopyFeature(String)`

### getSortedConcepts

    protected Concept[] getSortedConcepts()

  Gets the parameters "TheConcepts".

  Returns:
    Returns a Concept[]

### getSortedKeys

    protected BaseAttribute[] getSortedKeys()

  Gets the primary keys of TheConcepts.

  Returns:
    Returns a BaseAttribute[]

### getInOutMap

    protected Feature[][] getInOutMap()
                               throws M4CompilerError

  Getter method for the mapping parameters.

  Returns:
    A two-dimensional array of Features. At position [0][i] is the ith "MapInput", at position [1][i] is the ith "MapOutput".
  Throws:
    `M4CompilerError`

### load

    public void load(Step st)
              throws ParameterDeselectedError,
                     M4CompilerError

  Description copied from class: `ExecutableOperator`
  Loads all parameters for this operator.

  Overrides:
    `load` in class `ExecutableOperator`
  Parameters:
    `st` - This executable operator's step
  Throws:
    `ParameterDeselectedError`
    `M4CompilerError`
  See Also:
    `Operator#load(Step)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005