Class CountHelper

java.lang.Object
org.ofbiz.core.entity.CountHelper

public class CountHelper extends Object
Creates a count query
Since:
v1.0.35
  • Constructor Details

    • CountHelper

      public CountHelper()
  • Method Details

    • buildCountSelectStatement

      public String buildCountSelectStatement(@Nonnull String tableName, @Nullable String field, @Nullable String whereClause, boolean isDistinct)
      returns the select statement as SELECT COUNT([DISTINCT] fieldName) FROM tableName WHERE whereClause
      Parameters:
      tableName - the table to query
      field - the field to query - if it is null use * as the fieldName
      whereClause - the WHERE clause, if specified
      isDistinct - whether to add distinct to the query