Examples of Count


Examples of org.apache.poi.ss.formula.functions.Count

    protected static final Function[] functions = produceFunctions();

    private static Function[] produceFunctions() {
        Function[] retval = new Function[368];

        retval[0] = new Count();
        retval[ID.IF] = new IfFunc();
        retval[2] = LogicalFunction.ISNA;
        retval[3] = LogicalFunction.ISERROR;
        retval[ID.SUM] = AggregateFunction.SUM;
        retval[5] = AggregateFunction.AVERAGE;
View Full Code Here

Examples of org.apache.solr.client.solrj.response.FacetField.Count

       
        if(ProductMarketingResponseBean.PRODUCT_MARKETING_DEFAULT_FACET_FIELD.equalsIgnoreCase(facetField.getName())){
          searchFacetViewBean.setName(facetField.getName());
            List<ValueBean> values = new ArrayList<ValueBean>();
            for (Iterator<Count> iterator = facetField.getValues().iterator(); iterator.hasNext();) {
                Count count = (Count) iterator.next();
                final CatalogCategoryMaster catalogCategoryMaster = catalogCategoryService.getMasterCatalogCategoryByCode(count.getName(), requestData.getMasterCatalogCode());
                ValueBean valueBean = new ValueBean(catalogCategoryMaster.getCode(), catalogCategoryMaster.getI18nName(localeCode) + "(" + count.getCount() + ")");               
                values.add(valueBean);
            }
            searchFacetViewBean.setValues(values);
        }
       
View Full Code Here

Examples of org.apache.torque.util.functions.Count

        List<Class<?>> returnTypes = new ArrayList<Class<?>>();

        summary.addGroupBy ( Summarize1Peer.GROUP_BY1 );
        returnTypes.add(String.class);

        summary.addAggregate("COUNT_RECS", new Count(Summarize1Peer.ID));
        returnTypes.add(Integer.class);

        summary.addAggregate("AVG_INT1", new Avg(Summarize1Peer.INT_1));
        returnTypes.add(Integer.class);
View Full Code Here

Examples of org.apache.wicket.util.value.Count

    // If the application wants component uses checked and
    // the response is not a redirect
    final IDebugSettings debugSettings = Application.get().getDebugSettings();
    if (debugSettings.getComponentUseCheck() && !getResponse().isRedirect())
    {
      final Count unrenderedComponents = new Count();
      final List unrenderedAutoComponents = new ArrayList();
      final StringBuffer buffer = new StringBuffer();
      renderedContainer.visitChildren(new IVisitor()
      {
        public Object component(final Component component)
        {
          // If component never rendered
          if (renderedComponents == null || !renderedComponents.contains(component))
          {
            // If auto component ...
            if (component.isAuto())
            {
              // Add to list of unrendered auto components to
              // delete below
              unrenderedAutoComponents.add(component);
            }
            else if (component.isVisibleInHierarchy())
            {
              // Increase number of unrendered components
              unrenderedComponents.increment();

              // Add to explanatory string to buffer
              buffer.append(Integer.toString(unrenderedComponents.getCount()) + ". " +
                  component + "\n");
              String metadata = (String)component
                  .getMetaData(Component.CONSTRUCTED_AT_KEY);
              if (metadata != null)
              {
                buffer.append(metadata);
              }
              metadata = (String)component.getMetaData(Component.ADDED_AT_KEY);
              if (metadata != null)
              {
                buffer.append(metadata);
              }
            }
            else
            {
              // if the component is not visible in hierarchy we
              // should not visit its children since they are also
              // not visible
              return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
            }
          }
          return CONTINUE_TRAVERSAL;
        }
      });

      // Remove any unrendered auto components since versioning couldn't
      // do it. We can't remove the component in the above visitChildren
      // callback because we're traversing the list at that time.
      for (int i = 0; i < unrenderedAutoComponents.size(); i++)
      {
        ((Component)unrenderedAutoComponents.get(i)).remove();
      }

      // Throw exception if any errors were found
      if (unrenderedComponents.getCount() > 0)
      {
        // Get rid of set
        renderedComponents = null;

        // Throw exception
View Full Code Here

Examples of org.apache.wicket.util.value.Count

    // If the application wants component uses checked and
    // the response is not a redirect
    final IDebugSettings debugSettings = Application.get().getDebugSettings();
    if (debugSettings.getComponentUseCheck() && !getResponse().isRedirect())
    {
      final Count unrenderedComponents = new Count();
      final List unrenderedAutoComponents = new ArrayList();
      final StringBuffer buffer = new StringBuffer();
      renderedContainer.visitChildren(new IVisitor()
      {
        public Object component(final Component component)
        {
          // If component never rendered
          if (renderedComponents == null || !renderedComponents.contains(component))
          {
            // If auto component ...
            if (component.isAuto())
            {
              // Add to list of unrendered auto components to
              // delete below
              unrenderedAutoComponents.add(component);
            }
            else if (component.isVisibleInHierarchy())
            {
              // Increase number of unrendered components
              unrenderedComponents.increment();

              // Add to explanatory string to buffer
              buffer.append(Integer.toString(unrenderedComponents.getCount()) + ". "
                  + component + "\n");
              String metadata = (String)component
                  .getMetaData(Component.CONSTRUCTED_AT_KEY);
              if (metadata != null)
              {
                buffer.append(metadata);
              }
              metadata = (String)component.getMetaData(Component.ADDED_AT_KEY);
              if (metadata != null)
              {
                buffer.append(metadata);
              }
            }
            else
            {
              // if the component is not visible in hierarchy we
              // should not visit its children since they are also
              // not visible
              return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER;
            }
          }
          return CONTINUE_TRAVERSAL;
        }
      });

      // Remove any unrendered auto components since versioning couldn't
      // do it. We can't remove the component in the above visitChildren
      // callback because we're traversing the list at that time.
      for (int i = 0; i < unrenderedAutoComponents.size(); i++)
      {
        ((Component)unrenderedAutoComponents.get(i)).remove();
      }

      // Throw exception if any errors were found
      if (unrenderedComponents.getCount() > 0)
      {
        // Get rid of set
        renderedComponents = null;

        // Throw exception
View Full Code Here

Examples of org.boris.expr.function.excel.COUNT

        CORREL c = new CORREL();
        fail("CORREL not implemented");
    }

    public void testCOUNT() throws Exception {
        COUNT c = new COUNT();
        assertEquals(eval(c, 1, 2, 3, "asdf", true), 3);
        assertEquals(eval(c, (Object) null, ExprMissing.MISSING), 0);
        assertEquals(eval(c, 1.2, -1.2), 2);
    }
View Full Code Here

Examples of org.drools.examples.benchmarks.manners.model.Count

                list.add( new LastSeat( Integer.parseInt( st.nextToken( ) ) ) );
            }

            if ( "count".equals( type ) )
            {
                list.add( new Count( Integer.parseInt( st.nextToken( ) ) ) );
            }

            if ( "context".equals( type ) )
            {
                list.add( new Context( st.nextToken( ) ) );
View Full Code Here

Examples of org.jibx.schema.types.Count

       
        // handle base class prevalidation first so values will be available
        super.prevalidate(vctx);
       
        // check added constraints for <b>all</b>
        Count count = getMaxOccurs();
        if (count != null && (count.isUnbounded() || count.getCount() != 1)) {
            vctx.addError("The <all> element only allows 'maxOccurs' of '1'", this);
        }
        count =getMinOccurs();
        if (count != null && (count.isUnbounded() || count.getCount() > 1)) {
            vctx.addError("The <all> element only allows 'minOccurs' of '0' or '1'", this);
        }
    }
View Full Code Here

Examples of org.jibx.schema.types.Count

     * @param part compositor being added as a particle
     * @param comp target compositor for add
     */
    private static void addCompositorPart(CommonCompositorDefinition part, CommonCompositorDefinition comp)  {
        FilteredSegmentList parts = part.getParticleList();
        Count maxo = part.getMaxOccurs();
        Count mino = part.getMinOccurs();
        if (parts.size() == 1 && (maxo == null || maxo.isEqual(1)) && (mino == null || mino.isEqual(1))) {
            comp.getParticleList().add(parts.get(0));
        } else if (parts.size() > 1) {
            comp.getParticleList().add(part);
        }
    }
View Full Code Here

Examples of org.jibx.schema.types.Count

     *
     * @param part particle to be checked
     * @return <code>true</code> if repeated, <code>false</code> if not
     */
    public static boolean isRepeated(IArity part) {
        Count max = part.getMaxOccurs();
        return (max != null && (max.isGreaterThan(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.