當前位置: 首頁>>代碼示例>>Java>>正文


Java OuterJoinType.equals方法代碼示例

本文整理匯總了Java中com.espertech.esper.type.OuterJoinType.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java OuterJoinType.equals方法的具體用法?Java OuterJoinType.equals怎麽用?Java OuterJoinType.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.espertech.esper.type.OuterJoinType的用法示例。


在下文中一共展示了OuterJoinType.equals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: build

import com.espertech.esper.type.OuterJoinType; //導入方法依賴的package包/類
/**
 * Build query plan.
 *
 * @param queryGraph            - navigability info
 * @param optionalOuterJoinType - outer join type, null if not an outer join
 * @param typesPerStream        - event types for each stream
 * @param tablesPerStream       - table info
 * @param uniqueIndexProps      props of unique indexes
 * @return query plan
 */
public static QueryPlan build(EventType[] typesPerStream, QueryGraph queryGraph, OuterJoinType optionalOuterJoinType, String[][][] uniqueIndexProps, TableMetadata[] tablesPerStream) {
    QueryPlanIndex[] indexSpecs = QueryPlanIndexBuilder.buildIndexSpec(queryGraph, typesPerStream, uniqueIndexProps);

    QueryPlanNode[] execNodeSpecs = new QueryPlanNode[2];
    TableLookupPlan[] lookupPlans = new TableLookupPlan[2];

    // plan lookup from 1 to zero
    lookupPlans[1] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, 1, 0, indexSpecs[0], typesPerStream, tablesPerStream[0]);

    // plan lookup from zero to 1
    lookupPlans[0] = NStreamQueryPlanBuilder.createLookupPlan(queryGraph, 0, 1, indexSpecs[1], typesPerStream, tablesPerStream[1]);
    execNodeSpecs[0] = new TableLookupNode(lookupPlans[0]);
    execNodeSpecs[1] = new TableLookupNode(lookupPlans[1]);

    if (optionalOuterJoinType != null) {
        if ((optionalOuterJoinType.equals(OuterJoinType.LEFT)) ||
                (optionalOuterJoinType.equals(OuterJoinType.FULL))) {
            execNodeSpecs[0] = new TableOuterLookupNode(lookupPlans[0]);
        }
        if ((optionalOuterJoinType.equals(OuterJoinType.RIGHT)) ||
                (optionalOuterJoinType.equals(OuterJoinType.FULL))) {
            execNodeSpecs[1] = new TableOuterLookupNode(lookupPlans[1]);
        }
    }

    return new QueryPlan(indexSpecs, execNodeSpecs);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:38,代碼來源:TwoStreamQueryPlanBuilder.java

示例2: build

import com.espertech.esper.type.OuterJoinType; //導入方法依賴的package包/類
/**
 * Build query plan.
 * @param queryGraph - navigability info
 * @param optionalOuterJoinType - outer join type, null if not an outer join
 * @param typesPerStream - event types for each stream
 * @return query plan
 */
public static QueryPlan build(EventType[] typesPerStream, QueryGraph queryGraph, OuterJoinType optionalOuterJoinType, String[][][] uniqueIndexProps)
{
    QueryPlanIndex[] indexSpecs = new QueryPlanIndex[2];
    QueryPlanNode[] execNodeSpecs = new QueryPlanNode[2];

    TableLookupPlan lookupPlans[] = new TableLookupPlan[2];

    // plan lookup from 1 to zero
    Pair<QueryPlanIndex, TableLookupPlan> plan = planQuery(1, 0, typesPerStream, queryGraph, uniqueIndexProps[0]);
    indexSpecs[0] = plan.getFirst();
    lookupPlans[1] = plan.getSecond();

    // plan lookup from zero to 1
    plan = planQuery(0, 1, typesPerStream, queryGraph, uniqueIndexProps[1]);
    indexSpecs[1] = plan.getFirst();
    lookupPlans[0] = plan.getSecond();

    execNodeSpecs[0] = new TableLookupNode(lookupPlans[0]);
    execNodeSpecs[1] = new TableLookupNode(lookupPlans[1]);

    if (optionalOuterJoinType != null)
    {
        if ( (optionalOuterJoinType.equals(OuterJoinType.LEFT)) ||
             (optionalOuterJoinType.equals(OuterJoinType.FULL)) )
        {
            execNodeSpecs[0] = new TableOuterLookupNode(lookupPlans[0]);
        }
        if ( (optionalOuterJoinType.equals(OuterJoinType.RIGHT)) ||
             (optionalOuterJoinType.equals(OuterJoinType.FULL)) )
        {
            execNodeSpecs[1] = new TableOuterLookupNode(lookupPlans[1]);
        }
    }

    return new QueryPlan(indexSpecs, execNodeSpecs);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:44,代碼來源:TwoStreamQueryPlanBuilder.java


注:本文中的com.espertech.esper.type.OuterJoinType.equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。