当前位置: 首页>>代码示例>>Java>>正文


Java OuterJoinType.INNER属性代码示例

本文整理汇总了Java中com.espertech.esper.type.OuterJoinType.INNER属性的典型用法代码示例。如果您正苦于以下问题:Java OuterJoinType.INNER属性的具体用法?Java OuterJoinType.INNER怎么用?Java OuterJoinType.INNER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.espertech.esper.type.OuterJoinType的用法示例。


在下文中一共展示了OuterJoinType.INNER属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: consistsOfAllInnerJoins

public static boolean consistsOfAllInnerJoins(OuterJoinDesc[] outerJoinDescList) {
    for (OuterJoinDesc desc : outerJoinDescList) {
        if (desc.getOuterJoinType() != OuterJoinType.INNER) {
            return false;
        }
    }
    return true;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:8,代码来源:OuterJoinDesc.java

示例2: optionalStreamsIfAny

public static boolean optionalStreamsIfAny(OuterJoinDesc[] outerJoinDescList) {
    if (outerJoinDescList == null || outerJoinDescList.length == 0) {
        return false;
    }
    for (OuterJoinDesc outerJoinDesc : outerJoinDescList) {
        if (outerJoinDesc.getOuterJoinType() != OuterJoinType.INNER) {
            return true;
        }
    }
    return false;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:11,代码来源:OuterJoinAnalyzer.java

示例3: graphInnerJoins

public static InnerJoinGraph graphInnerJoins(int numStreams, OuterJoinDesc[] outerJoinDescList) {
    if ((outerJoinDescList.length + 1) != numStreams) {
        throw new IllegalArgumentException("Number of outer join descriptors and number of streams not matching up");
    }

    Set<InterchangeablePair<Integer, Integer>> graph = new HashSet<InterchangeablePair<Integer, Integer>>();

    boolean allInnerJoin = true;
    for (int i = 0; i < outerJoinDescList.length; i++) {
        OuterJoinDesc desc = outerJoinDescList[i];
        int streamMax = i + 1;       // the outer join must references streams less then streamMax

        // Check outer join on-expression, if provided
        if (desc.getOptLeftNode() != null) {
            int streamOne = desc.getOptLeftNode().getStreamId();
            int streamTwo = desc.getOptRightNode().getStreamId();

            if ((streamOne > streamMax) || (streamTwo > streamMax) ||
                    (streamOne == streamTwo)) {
                throw new IllegalArgumentException("Outer join descriptors reference future streams, or same streams");
            }

            if (desc.getOuterJoinType() == OuterJoinType.INNER) {
                graph.add(new InterchangeablePair<Integer, Integer>(streamOne, streamTwo));
            }
        }

        if (desc.getOuterJoinType() != OuterJoinType.INNER) {
            allInnerJoin = false;
        }
    }

    if (allInnerJoin) {
        return new InnerJoinGraph(numStreams, true);
    }
    return new InnerJoinGraph(numStreams, graph);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:37,代码来源:InnerJoinGraph.java

示例4: consistsOfAllInnerJoins

public static boolean consistsOfAllInnerJoins(List<OuterJoinDesc> outerJoinDescList) {
    for (OuterJoinDesc desc : outerJoinDescList) {
        if (desc.getOuterJoinType() != OuterJoinType.INNER) {
            return false;
        }
    }
    return true;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:8,代码来源:OuterJoinDesc.java

示例5: graphOuterJoins

/**
 * Builds a graph of outer joins given the outer join information from the statement.
 * Eliminates right and left joins and full joins by placing the information in a graph object.
 *
 * @param numStreams        - is the number of streams
 * @param outerJoinDescList - list of outer join stream numbers and property names
 * @return graph object
 */
protected static OuterInnerDirectionalGraph graphOuterJoins(int numStreams, OuterJoinDesc[] outerJoinDescList) {
    if ((outerJoinDescList.length + 1) != numStreams) {
        throw new IllegalArgumentException("Number of outer join descriptors and number of streams not matching up");
    }

    OuterInnerDirectionalGraph graph = new OuterInnerDirectionalGraph(numStreams);

    for (int i = 0; i < outerJoinDescList.length; i++) {
        OuterJoinDesc desc = outerJoinDescList[i];
        int streamMax = i + 1;       // the outer join must references streams less then streamMax

        // Check outer join on-expression, if provided
        int streamOne;
        int streamTwo;
        int lowerStream;
        int higherStream;
        if (desc.getOptLeftNode() != null) {
            streamOne = desc.getOptLeftNode().getStreamId();
            streamTwo = desc.getOptRightNode().getStreamId();

            if ((streamOne > streamMax) || (streamTwo > streamMax) ||
                    (streamOne == streamTwo)) {
                throw new IllegalArgumentException("Outer join descriptors reference future streams, or same streams");
            }

            // Determine who is the first stream in the streams listed
            lowerStream = streamOne;
            higherStream = streamTwo;
            if (streamOne > streamTwo) {
                lowerStream = streamTwo;
                higherStream = streamOne;
            }
        } else {
            streamOne = i;
            streamTwo = i + 1;
            lowerStream = i;
            higherStream = i + 1;

            graph.addUnqualifiedNavigable(streamOne, streamTwo);
        }

        // Add to graph
        if (desc.getOuterJoinType() == OuterJoinType.FULL) {
            graph.add(streamOne, streamTwo);
            graph.add(streamTwo, streamOne);
        } else if (desc.getOuterJoinType() == OuterJoinType.LEFT) {
            graph.add(lowerStream, higherStream);
        } else if (desc.getOuterJoinType() == OuterJoinType.RIGHT) {
            graph.add(higherStream, lowerStream);
        } else if (desc.getOuterJoinType() == OuterJoinType.INNER) {
            // no navigability for inner joins
        } else {
            throw new IllegalArgumentException("Outer join descriptors join type not handled, type=" + desc.getOuterJoinType());
        }
    }

    return graph;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:66,代码来源:NStreamOuterQueryPlanBuilder.java

示例6: graphOuterJoins

/**
 * Builds a graph of outer joins given the outer join information from the statement.
 * Eliminates right and left joins and full joins by placing the information in a graph object.
 * @param numStreams - is the number of streams
 * @param outerJoinDescList - list of outer join stream numbers and property names
 * @return graph object
 */
protected static OuterInnerDirectionalGraph graphOuterJoins(int numStreams, List<OuterJoinDesc> outerJoinDescList)
{
    if ((outerJoinDescList.size() + 1) != numStreams)
    {
        throw new IllegalArgumentException("Number of outer join descriptors and number of streams not matching up");
    }

    OuterInnerDirectionalGraph graph = new OuterInnerDirectionalGraph(numStreams);

    for (int i = 0; i < outerJoinDescList.size(); i++)
    {
        OuterJoinDesc desc = outerJoinDescList.get(i);
        int streamMax = i + 1;       // the outer join must references streams less then streamMax

        // Check outer join on-expression, if provided
        int streamOne;
        int streamTwo;
        int lowerStream;
        int higherStream;
        if (desc.getOptLeftNode() != null) {
            streamOne = desc.getOptLeftNode().getStreamId();
            streamTwo = desc.getOptRightNode().getStreamId();

            if ((streamOne > streamMax) || (streamTwo > streamMax) ||
                (streamOne == streamTwo))
            {
                throw new IllegalArgumentException("Outer join descriptors reference future streams, or same streams");
            }

            // Determine who is the first stream in the streams listed
            lowerStream = streamOne;
            higherStream = streamTwo;
            if (streamOne > streamTwo)
            {
                lowerStream = streamTwo;
                higherStream = streamOne;
            }
        }
        else {
            streamOne = i;
            streamTwo = i + 1;
            lowerStream = i;
            higherStream = i + 1;

            graph.addUnqualifiedNavigable(streamOne, streamTwo);
        }

        // Add to graph
        if (desc.getOuterJoinType() == OuterJoinType.FULL)
        {
            graph.add(streamOne, streamTwo);
            graph.add(streamTwo, streamOne);
        }
        else if (desc.getOuterJoinType() == OuterJoinType.LEFT)
        {
            graph.add(lowerStream, higherStream);
        }
        else if (desc.getOuterJoinType() == OuterJoinType.RIGHT)
        {
            graph.add(higherStream, lowerStream);
        }
        else if (desc.getOuterJoinType() == OuterJoinType.INNER)
        {
            // no navigability for inner joins
        }
        else
        {
            throw new IllegalArgumentException("Outer join descriptors join type not handled, type=" + desc.getOuterJoinType());
        }
    }

    return graph;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:80,代码来源:NStreamOuterQueryPlanBuilder.java

示例7: graphInnerJoins

public static InnerJoinGraph graphInnerJoins(int numStreams, List<OuterJoinDesc> outerJoinDescList)
{
    if ((outerJoinDescList.size() + 1) != numStreams)
    {
        throw new IllegalArgumentException("Number of outer join descriptors and number of streams not matching up");
    }

    Set<InterchangeablePair<Integer, Integer>> graph = new HashSet<InterchangeablePair<Integer, Integer>>();

    boolean allInnerJoin = true;
    for (int i = 0; i < outerJoinDescList.size(); i++)
    {
        OuterJoinDesc desc = outerJoinDescList.get(i);
        int streamMax = i + 1;       // the outer join must references streams less then streamMax

        // Check outer join on-expression, if provided
        if (desc.getOptLeftNode() != null) {
            int streamOne = desc.getOptLeftNode().getStreamId();
            int streamTwo = desc.getOptRightNode().getStreamId();

            if ((streamOne > streamMax) || (streamTwo > streamMax) ||
                (streamOne == streamTwo))
            {
                throw new IllegalArgumentException("Outer join descriptors reference future streams, or same streams");
            }

            if (desc.getOuterJoinType() == OuterJoinType.INNER)
            {
                graph.add(new InterchangeablePair<Integer, Integer>(streamOne, streamTwo));
            }
        }

        if (desc.getOuterJoinType() != OuterJoinType.INNER)
        {
            allInnerJoin = false;
        }
    }

    if (allInnerJoin) {
        return new InnerJoinGraph(numStreams, true);
    }
    return new InnerJoinGraph(numStreams, graph);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:43,代码来源:InnerJoinGraph.java


注:本文中的com.espertech.esper.type.OuterJoinType.INNER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。