Examples of where()


Examples of org.apache.isis.core.progmodel.facets.members.hidden.HiddenFacetAbstract.where()

        final Facet facet = facetedMethod.getFacet(HiddenFacet.class);
        final HiddenFacetAbstract hiddenFacetAbstract = (HiddenFacetAbstract) facet;

        assertEquals(When.UNTIL_PERSISTED, hiddenFacetAbstract.when());
        assertEquals(Where.ANYWHERE, hiddenFacetAbstract.where());
    }

    public void testHiddenWhereCollectionTableAnnotationPickedUpOn() {
        class Customer {
            @Hidden(where=Where.PARENTED_TABLES)
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery.WHERE()

    }

    // Make sure keys aren't implicated in another transfer request
    DynamicQuery checkKeysQry = new DynamicQuery();
    checkKeysQry.append("select ttk.entityKey from TransferTokenKey ttk ");
    checkKeysQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));

    Query qry = checkKeysQry.buildJPAQuery(em);
    List<?> obj = qry.getResultList();
    if (obj != null && obj.size() > 0)
      throw new TokenAlreadyExistsException(new ErrorMessage("errors.gettransfertoken.KeyExists", (String)obj.get(0)));
View Full Code Here

Examples of org.apache.metamodel.query.Query.where()

        QueryPostprocessDataContext dc = new CsvDataContext(file);
        Table table = dc.getDefaultSchema().getTableByName("csv_people.csv");

        Query q = new Query();
        q.from(table);
        q.where(new FilterItem(new SelectItem(table.getColumnByName("id")), OperatorType.EQUALS_TO, 1));
        q.select(table.getColumnByName("name"));
        DataSet data = dc.executeQuery(q);
        assertTrue(data.next());
        assertEquals("Row[values=[mike]]", data.getRow().toString());
        assertFalse(data.next());
View Full Code Here

Examples of org.apache.metamodel.query.Query.where()

                    // This is the first split query: no higherThan filter and
                    // include
                    // IS NULL
                    FilterItem nullFilter = new FilterItem(new SelectItem(column), OperatorType.EQUALS_TO, null);
                    FilterItem orFilterItem = new FilterItem(lowerThanFilter, nullFilter);
                    q.where(orFilterItem);
                } else if (i + 1 == numSplits) {
                    // This is the lats split query: no lowerThan filter,
                    FilterItem orFilterItem = new FilterItem(higherThanFilter, equalsFilter);
                    q.where(orFilterItem);
                } else {
View Full Code Here

Examples of org.apache.metamodel.query.Query.where()

                    FilterItem orFilterItem = new FilterItem(lowerThanFilter, nullFilter);
                    q.where(orFilterItem);
                } else if (i + 1 == numSplits) {
                    // This is the lats split query: no lowerThan filter,
                    FilterItem orFilterItem = new FilterItem(higherThanFilter, equalsFilter);
                    q.where(orFilterItem);
                } else {
                    higherThanFilter = new FilterItem(higherThanFilter, equalsFilter);
                    lowerThanFilter = new FilterItem(lowerThanFilter, equalsFilter);
                    q.where(higherThanFilter);
                    q.where(lowerThanFilter);
View Full Code Here

Examples of org.apache.metamodel.query.Query.where()

                    FilterItem orFilterItem = new FilterItem(higherThanFilter, equalsFilter);
                    q.where(orFilterItem);
                } else {
                    higherThanFilter = new FilterItem(higherThanFilter, equalsFilter);
                    lowerThanFilter = new FilterItem(lowerThanFilter, equalsFilter);
                    q.where(higherThanFilter);
                    q.where(lowerThanFilter);
                }
                result.add(q);
            }
        }
View Full Code Here

Examples of org.apache.metamodel.query.Query.where()

                    q.where(orFilterItem);
                } else {
                    higherThanFilter = new FilterItem(higherThanFilter, equalsFilter);
                    lowerThanFilter = new FilterItem(lowerThanFilter, equalsFilter);
                    q.where(higherThanFilter);
                    q.where(lowerThanFilter);
                }
                result.add(q);
            }
        }
        return result;
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.Select.where()

            return sel;
        }

        // now set sql criteria; it goes on the inner select if present
        if (inner != null)
            inner.where(where);
        else
            sel.where(where);

        // apply grouping and having.  this does not select the grouping
        // columns, just builds the GROUP BY clauses.  we don't build the
View Full Code Here

Examples of org.apache.openjpa.persistence.query.DomainObject.where()

    }

    public void testFetchJoin() {
        DomainObject d = qb.createQueryDefinition(Department.class);
        d.leftJoinFetch("employees");
        d.where(d.get("deptNo").equal(1));
       
       
        String jpql = "select d from Department d" +
                      " LEFT JOIN FETCH d.employees" +
                      " where d.deptNo = 1";
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.where()

    }
   
    public void testParamater() {
        QueryDefinition qdef = qb.createQueryDefinition();
        DomainObject customer = qdef.addRoot(Customer.class);
        qdef.where(customer.get("status").equal(qdef.param("status")));
       
        String jpql = "select c from Customer c " +
                      " where c.status = :status";
        compare(jpql, qdef, "status", 1);
    }
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.