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

## com.sun.mdm.index.query
Class MultiQPath

    java.lang.Object
      com.sun.mdm.index.query.QPath
          com.sun.mdm.index.query.MultiQPath

class MultiQPath
extends QPath

This is used by MultiQueryParser. This class basically defines the creating of Select fields in the target SQL statement.

Constructor Summary
`(package private)` | `MultiQPath()` Creates a new instance of MultiQPath

Method Summary
`(package private) void` | `add(java.lang.String object)`
`(package private) QPath` | `cloneLessLeaf()`
`(package private) boolean` | `contains(java.lang.String object)`
`(package private) java.lang.StringBuffer` | `createANSIJoin(java.lang.StringBuffer innerBuf, java.lang.String primaryObject, java.lang.String secondaryObject, boolean outerJoin, boolean nesting)`
`(package private) java.lang.StringBuffer` | `createANSIJoins()`
`(package private) java.lang.StringBuffer` | `createConditions(ConditionMap conditionMap, int unionIndex)`
`(package private) java.lang.StringBuffer` | `createFromTable(int unionIndex)`
`(package private) void` | `createJoin(java.lang.StringBuffer joinFields, java.lang.String primaryObject, java.lang.String secondaryObject)`
`(package private) java.lang.StringBuffer` | `createJoins(int unionIndex)`
`(package private) java.lang.StringBuffer` | `createOrderBy(SQLDescriptor sqlDesc)`
`(package private) void` | `createOuterJoin(java.lang.StringBuffer joinFields, java.lang.String primaryObject, java.lang.String secondaryObject)`
`(package private) java.lang.StringBuffer` | `createSelectFields(SQLDescriptor sqlDesc, SelectMap selectMap)`
`(package private) SQLDescWithBindParameters` | `createSQL(ConditionMap[] conditionMap, java.lang.Object selectObject, int maxRows, java.lang.String[] hints)` create SQLDescriptor.
`(package private) java.lang.StringBuffer` | `createSQL(java.lang.StringBuffer selectbuf, java.lang.StringBuffer fromTable, java.lang.StringBuffer joinbuf, java.lang.StringBuffer conditionbuf, int maxRows, java.lang.String hint)`
`(package private) void` | `createsubQPath(QPath[] conditionPaths, ConditionMap[] conditionMaps)` This methods creates list of subpaths for each QPath.
`(package private) Condition[]` | `getConditions()`
`(package private) java.util.List` | `getFieldPrepareIndex()`
`(package private) int` | `getIndex(java.lang.String object)`
`(package private) java.lang.String` | `getLeaf()`
`(package private) java.lang.String` | `getObject(int i)`
`(package private) java.lang.String` | `getRoot()`
`(package private) void` | `initPrepareIndexMap(int size)`
`(package private) void` | `setConditions(Condition[] conditions)`
`(package private) int` | `size()`
`java.lang.String` | `toString()` String representation of QPath

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

Constructor Detail

### MultiQPath

    MultiQPath()

  Creates a new instance of MultiQPath

Method Detail

### add

    void add(java.lang.String object)

### cloneLessLeaf

    QPath cloneLessLeaf()

  Overrides:
    `cloneLessLeaf` in class `QPath`

### contains

    boolean contains(java.lang.String object)

### createANSIJoin

    java.lang.StringBuffer createANSIJoin(java.lang.StringBuffer innerBuf,
                                          java.lang.String primaryObject,
                                          java.lang.String secondaryObject,
                                          boolean outerJoin,
                                          boolean nesting)

  Parameters:
    `innerBuf` - if null, use secondary object table within the constructed clause otherwise use innerBuf in the constructed ANSI join as in example below. If nesting is false, innerBuf should be false too.
    `primaryObject` -
    `secondaryObject` -
    `outerJoin` -
    `nesting` - false: ansi clause is of to constructed in form: ex: sbyn_person left outer join sbyn_address on sbyn_person.personid=sbyn_address.personid left outer join sbyn_alias on sbyn_person.personid = sbyn_alias.personid nesting true: ansi clause is of form: ex: (sbyn_systemobject left outer join (sbyn_person left outer join sbyn_address on sbyn_person.personid=sbyn_address.personid) on sbyn_systemobject.systemcode = sbyn_person.systemcode and sbyn_systemobject.lid = sbyn_person.lid )
  Returns:

### createANSIJoins

    java.lang.StringBuffer createANSIJoins()

### createConditions

    java.lang.StringBuffer createConditions(ConditionMap conditionMap,
                                            int unionIndex)

### createFromTable

    java.lang.StringBuffer createFromTable(int unionIndex)

### createJoin

    void createJoin(java.lang.StringBuffer joinFields,
                    java.lang.String primaryObject,
                    java.lang.String secondaryObject)

### createJoins

    java.lang.StringBuffer createJoins(int unionIndex)

### createOrderBy

    java.lang.StringBuffer createOrderBy(SQLDescriptor sqlDesc)

### createOuterJoin

    void createOuterJoin(java.lang.StringBuffer joinFields,
                         java.lang.String primaryObject,
                         java.lang.String secondaryObject)

### createSelectFields

    java.lang.StringBuffer createSelectFields(SQLDescriptor sqlDesc,
                                              SelectMap selectMap)

  Description copied from class: `QPath`
  The subclass would implement this method.

  Overrides:
    `createSelectFields` in class `QPath`
  Parameters:
    `sqlDesc` -
    `selectMap` -

### createSQL

    SQLDescWithBindParameters createSQL(ConditionMap[] conditionMap,
                                        java.lang.Object selectObject,
                                        int maxRows,
                                        java.lang.String[] hints)

  create SQLDescriptor. The selectMap gives all the fields to be selected in the SQL statement. conditionMap gives all the conditions that needs to be set in this SQL statement. Note: This implemenation is done from MultiQPath (multiple queries) point of view. subclass SinglePath needs to override this method.

  Parameters:
    `conditionMap` -
    `selectObject` -

### createSQL

    java.lang.StringBuffer createSQL(java.lang.StringBuffer selectbuf,
                                     java.lang.StringBuffer fromTable,
                                     java.lang.StringBuffer joinbuf,
                                     java.lang.StringBuffer conditionbuf,
                                     int maxRows,
                                     java.lang.String hint)

### createsubQPath

    void createsubQPath(QPath[] conditionPaths,
                        ConditionMap[] conditionMaps)

  This methods creates list of subpaths for each QPath. Given a QPath a subpath is formed from other QPaths. A subpath is navigation from the lowest leaf in a QPath that has a condition, to the intersecting node in QPath. So if this QPath is { System Person Address } and other QPaths are { System Person Phone }, { System Person Alias } and conditions are Phone.area = '626' and System.EUID = 'E1', then subpaths would be: {Person Phone}. Alias path is not included because it does not have condition. System is not included in subpath because it is already in the QPath. If there are more than one CondtionMap, then each QPath contains list of subpaths list. So each list of subpaths list is used in Union operation. Note: Each ConditionMap in ConditionMap[] is for a different union operation of conditions.

  Parameters:
    `conditionPaths` -
    `conditionMaps` -

### getConditions

    Condition[] getConditions()

### getFieldPrepareIndex

    java.util.List getFieldPrepareIndex()

### getIndex

    int getIndex(java.lang.String object)

### getLeaf

    java.lang.String getLeaf()

### getObject

    java.lang.String getObject(int i)

### getRoot

    java.lang.String getRoot()

### initPrepareIndexMap

    void initPrepareIndexMap(int size)

### setConditions

    void setConditions(Condition[] conditions)

### size

    int size()

### toString

    public java.lang.String toString()

  String representation of QPath

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

Sun Microsystems, Inc.