Package org.ofbiz.core.entity
Class CountHelper
java.lang.Object
org.ofbiz.core.entity.CountHelper
Creates a count query
- Since:
- v1.0.35
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCountSelectStatement(String tableName, String field, String whereClause, boolean isDistinct) returns the select statement as SELECT COUNT([DISTINCT] fieldName) FROM tableName WHERE whereClause
-
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 queryfield- the field to query - if it is null use * as the fieldNamewhereClause- the WHERE clause, if specifiedisDistinct- whether to add distinct to the query
-