Examples of GroupByClause


Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    /**
     * {@inheritDoc}
     */
    public boolean isClauseComplete(T expression) {

      GroupByClause groupByClause = (GroupByClause) expression.getGroupByClause();
      Expression items = groupByClause.getGroupByItems();
      boolean complete = isValid(items, GroupByItemBNF.ID);

      if (complete) {
        complete = isComplete(items);
      }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      GroupByClause expression = stateObject.getExpression();

      // 'GROUP BY'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : GROUP_BY, GROUP_BY);

      if (shouldOutput(expression) || expression.hasSpaceAfterGroupBy()) {
        writer.append(SPACE);
      }

      // Group by items
      if (stateObject.hasItems()) {
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      GroupByClause expression = stateObject.getExpression();

      // 'GROUP BY'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : GROUP_BY, GROUP_BY);

      if (shouldOutput(expression) || expression.hasSpaceAfterGroupBy()) {
        writer.append(SPACE);
      }

      // Group by items
      if (stateObject.hasItems()) {
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      GroupByClause expression = stateObject.getExpression();

      // 'GROUP BY'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : GROUP_BY, GROUP_BY);

      if (shouldOutput(expression) || expression.hasSpaceAfterGroupBy()) {
        writer.append(SPACE);
      }

      // Group by items
      if (stateObject.hasItems()) {
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      GroupByClause expression = stateObject.getExpression();

      // 'GROUP BY'
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : GROUP_BY, GROUP_BY);

      if (shouldOutput(expression) || expression.hasSpaceAfterGroupBy()) {
        writer.append(SPACE);
      }

      // Group by items
      if (stateObject.hasItems()) {
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.parser.GroupByClause

    /**
     * {@inheritDoc}
     */
    public boolean isClauseComplete(T expression) {

      GroupByClause groupByClause = (GroupByClause) expression.getGroupByClause();
      Expression items = groupByClause.getGroupByItems();
      boolean complete = isValid(items, GroupByItemBNF.ID);

      if (complete) {
        complete = isComplete(items);
      }
View Full Code Here

Examples of org.yaac.server.egql.GroupByClause

   *
   * @param record
   * @return
   */
  private Map<String, Object> groupByRecord(ProcessDataRecord record) {
    GroupByClause clause = stmt.getGroupByClause();
   
    if (clause == null) {
      return newLinkedHashMap();
    } else {
      Iterable<String> groupByKeys = clause.itemsInStr();
      
      Map<String, Object> groupByRecord = newLinkedHashMap();
     
      for (String propertyName : groupByKeys) {
        groupByRecord.put(propertyName, record.lookup(propertyName).getPayload());
View Full Code Here

Examples of org.yaac.server.egql.GroupByClause

   */
  @Test
  public void test() throws Exception {
    String inputStr = "group by a.b, a.c, e";
   
    GroupByClause actual = TestUtil.parser(inputStr).group_clause().e;
   
    GroupByClause expected = new GroupByClause().add("a.b").add("a.c").add("e");
   
    Assert.assertEquals(expected, actual);
  }
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.