Examples of Union


Examples of org.apache.cocoon.woody.formmodel.Union

        Widget widget = frmModel.getWidget(this.widgetId);
        JXPathContext subContext = jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
        if (!(widget instanceof Union))
            throw new RuntimeException("Binding: Expected Union widget, but received class: \"" +
                    widget.getClass().getName() + "\".");
        Union unionWidget = (Union)widget;
        Binding[] subBindings = getChildBindings();
        if (subBindings != null) {
            int size = subBindings.length;
            for (int i = 0; i < size; i++) {
                subBindings[i].loadFormFromModel(unionWidget, subContext);
View Full Code Here

Examples of org.apache.crunch.Union

    @Override
    public Union map(UnionWritable in) {
      int index = in.getIndex();
      Writable w = create(writableClasses.get(index), in.getValue());
      return new Union(index, fns.get(index).map(w));
    }
View Full Code Here

Examples of org.apache.cxf.binding.corba.wsdl.Union

            WSDLToIDLAction idlgen = new WSDLToIDLAction();
            idlgen.setBindingName("NillableCORBABinding");
            idlgen.setOutputFile("nillable.idl");
            idlgen.generateIDL(model);
           
            Union un = (Union)mapType.getStructOrExceptionOrUnion().get(2);
            assertEquals("Name is incorrect for Union Type", "long_nil",
                         un.getName());
            assertEquals("Type is incorrect for Union Type", "PEl",
                         un.getType().getLocalPart());
            Unionbranch unbranch = un.getUnionbranch().get(0);
            assertEquals("Name is incorrect for UnionBranch Type", "value",
                         unbranch.getName());
            assertEquals("Type is incorrect for UnionBranch Type", "long",
                         unbranch.getIdltype().getLocalPart());
View Full Code Here

Examples of org.apache.drill.common.logical.data.Union

    case 1:
      ScanROP scanner = new ScanROP(scan, readEntries.iterator().next(), engine);
      scanner.init(registry, builder);
      return;
    default:
      Union logOp = new Union(null, false);

      ROP parentUnion = new UnionROP(logOp);
      ScanROP[] scanners = new ScanROP[readEntries.size()];
      int i = 0;
      for (ReadEntry e : readEntries) {
View Full Code Here

Examples of org.apache.harmony.pack200.NewAttributeBands.Union

        MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
                null, null, new AttributeDefinition(35,
                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
        List layoutElements = newAttributeBands.getLayoutElements();
        assertEquals(1, layoutElements.size());
        Union element = (Union) layoutElements.get(0);
        Integral tag = element.getUnionTag();
        assertEquals("B", tag.getTag());
        List unionCases = element.getUnionCases();
        assertEquals(2, unionCases.size());
        UnionCase firstCase = (UnionCase) unionCases.get(0);
        assertTrue(firstCase.hasTag(55));
        assertFalse(firstCase.hasTag(23));
        List body = firstCase.getBody();
        assertEquals(1, body.size());
        Integral bodyElement = (Integral) body.get(0);
        assertEquals("FH", bodyElement.getTag());
        UnionCase secondCase = (UnionCase) unionCases.get(1);
        assertTrue(secondCase.hasTag(23));
        assertFalse(secondCase.hasTag(55));
        body = secondCase.getBody();
        assertEquals(0, body.size());
        List defaultBody = element.getDefaultCaseBody();
        assertEquals(1, defaultBody.size());
        Reference ref = (Reference) defaultBody.get(0);
        assertEquals("RSH", ref.getTag());
    }
View Full Code Here

Examples of org.apache.imperius.spl.parser.expressions.impl.Union

           
            Expression collection1 = new BasicCollectionExpression(vbytes1,null);
           
            v.add(collection);
            v.add(collection1);
            Expression es1 = new Union(v,true);
            v.clear();
            List resultList=(List)es1.evaluate();
//            System.out.println("list "+ resultList.toString());
            assertTrue(((Number)resultList.get(0)).floatValue()==(float)1.11);
            assertTrue(((Number)resultList.get(1)).floatValue()==(float)2.22);
            assertTrue(((Number)resultList.get(2)).floatValue()==(float)3.33);
            assertTrue(((Number)resultList.get(3)).floatValue()==(float)4.44);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Union

        final JDBCFetchConfiguration fetch) throws SQLException {
        final JDBCStoreManager store = this;
        final int eager = Math.min(fetch.getEagerFetchMode(),
            JDBCFetchConfiguration.EAGER_JOIN);

        Union union = _sql.newUnion(mappings.length);
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(mapping) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int i) {
                sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch,
                    eager);
                sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store);
            }
        });
        return union.execute(this, fetch);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Union

                    return rops[0];
                return new MergedResultObjectProvider(rops);
            }

            // perform a union on all independent classes
            Union union = _sql.newUnion(mappings.length);
            union.setLRS(true);
            final BitSet[] paged = new BitSet[mappings.length];
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    paged[idx] = selectExtent(sel, mappings[idx], jfetch,
                        subclasses);
                }
            });
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Union

        if (!(sel instanceof Union))
            selectEager((Select) sel, getDefaultElementMapping(true), sm,
                store, fetch, eagerMode, true, false);
        else {
            final ClassMapping[] elems = getIndependentElementMappings(true);
            Union union = (Union) sel;
            if (fetch.getSubclassFetchMode(field.getElementMapping().
                getTypeMapping()) != fetch.EAGER_JOIN)
                union.abortUnion();
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    selectEager(sel, elems[idx], sm, store, fetch, eagerMode,
                        true, false);
                }
            });
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Union

        }

        // select data for this sm
        final ClassMapping[] elems = getIndependentElementMappings(true);
        final Joins[] resJoins = new Joins[Math.max(1, elems.length)];
        Union union = store.getSQLFactory().newUnion
            (Math.max(1, elems.length));
        union.select(new Union.Selector() {
            public void select(Select sel, int idx) {
                ClassMapping elem = (elems.length == 0) ? null : elems[idx];
                resJoins[idx] = selectAll(sel, elem, sm, store, fetch,
                    JDBCFetchConfiguration.EAGER_PARALLEL);
            }
        });

        // create proxy
        Object coll;
        ChangeTracker ct = null;
        if (field.getTypeCode() == JavaTypes.ARRAY)
            coll = new ArrayList();
        else {
            coll = sm.newProxy(field.getIndex());
            if (coll instanceof Proxy)
                ct = ((Proxy) coll).getChangeTracker();
        }

        // load values
        Result res = union.execute(store, fetch);
        try {
            int seq = 0;
            while (res.next()) {
                if (ct != null && field.getOrderColumn() != null)
                    seq = res.getInt(field.getOrderColumn());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.