Internal Website Search

1-32 of 32 results

GROUP BY and HAVING clauses

(count, sum , avg, max, min) that are carried out on all the objects (or the object tuples) in ... of SQL: COUNT - returns a long value representing the number of elements. SUM - returns the sum ... that currency: SELECT c.currency, SUM (c.population) FROM Country c WHERE 'Europe' MEMBER OF c.continents

Numbers in JPQL and Criteria Queries

. get ("population"); Expression param = cb. parameter (Integer.class); // Addition (+) Expression sum1 = cb. sum (path, param); // 2 expressions Expression sum2 = cb. sum (path, 1000); // expression + number Expression sum3 = cb. sum (1000, path); // number + expression // Subtraction (-) Expression diff1 = cb

CriteriaBuilder.sum(x) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sum (    Expression  x ) Create an aggregate expression applying the sum operation. Parameters: x - expression representing input value to sum operation Return: sum expression Since: JPA 2.0

CriteriaBuilder.sum(x,y) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sum (   N x,     Expression  y ) Create an expression that returns the sum of its arguments. Parameters: x - value y - expression Return: sum Since: JPA 2.0

CriteriaBuilder.sum(x,y) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sum (    Expression  x,    N y ) Create an expression that returns the sum of its arguments. Parameters: x - expression y - value Return: sum Since: JPA 2.0

CriteriaBuilder.sum(x,y) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sum (    Expression  x,     Expression  y ) Create an expression that returns the sum of its arguments. Parameters: x - expression y - expression Return: sum Since: JPA 2.0

JPA Criteria API Queries

, join , fetch ). WHERE clause ( where ). GROUP BY / HAVING clauses ( groupBy , having , count , sum ... , nullLiteral , currentDate , ...). Paths, navigation and types ( get , type ). Arithmetic expressions ( sum

FROM clause (JPQL / Criteria API)

, SOME, SQRT, SUBSTRING, SUM , THEN,TRAILING, TRIM, TRUE, TYPE, UNKNOWN, UPDATE, UPPER, VALUE

Is ObjectDB better than competing object databases?

do not support aggregate queries (max, min, count, sum and avg). ObjectDB supports rich queries

JPA Query Expressions (JPQL / Criteria)

, ...). Paths, navigation and types ( get , type ). Arithmetic expressions ( sum , diff , prod

JPA Query Structure (JPQL / Criteria)

;( where ). Criteria GROUP BY / HAVING  ( groupBy , having , count , sum , avg , min , max

ObjectDB Object Database Features

and aggregates ). ORDER BY (including ASC, DESC). Aggregates (COUNT, SUM , AVG, MAX, MIN). Query

ORDER BY clause (JPQL / Criteria API)

.currency, SUM (c.population) FROM Country c WHERE 'Europe' MEMBER OF c.continents GROUP BY c

javax.persistence.criteria.CriteriaBuilder

to substring extraction Since: JPA 2.0 Expression sum ( Expression  x,  Expression  y) Create an expression that returns the sum of its arguments. Parameters: x - expression y - expression Return: sum Since: JPA 2.0 Expression sum ( Expression  x, N y) Create an expression

Wrong type on SUM function

;      "SELECT cc.totalCC.moneda, SUM (cc.totalCC.importe) FROM ... is about SUM on cc.totalCC.importe, a BigDecimal field. It works fine on all groups giving to me the correct sum BigDecimal value, except in one group that have only one object with a BigDecimal value

Problem of query With an aggregate function

Hi I would know if this type of query is supported By JPA: select sum (nb1), sum (nb2), sum (nb3 ... choix) { Query listClassRepHost = em.createQuery("SELECT SUM (h.nb1xx), SUM (h.nb2xx), SUM (h.nb3xx), SUM (h.nb4xx), SUM (h.nb5xx) FROM HttpEntity h WHERE h.host = :host and h.date_http BETWEEN to_date

How to convert a boolean to an int in the query?

, approvePhoneNumber, .... because the parameters equivalent. I want to sort them in the query by their sum ... for your help galandor Orlov Sergey Consider adding an int field to your entity class, that will sum ... (cb. sum (intApproveEmail, intApprovePhoneNumber))); query = em.createQuery(q); resultList = query

CriteriaBuilder.sumAsDouble(x) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sumAsDouble (    Expression  x ) Create an aggregate expression applying the sum operation to a Float-valued expression, returning a Double result. Parameters: x - expression representing input value to sum operation Return: sum expression Since: JPA 2.0

CriteriaBuilder.sumAsLong(x) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression sumAsLong (    Expression  x ) Create an aggregate expression applying the sum operation to an Integer-valued expression, returning a Long result. Parameters: x - expression representing input value to sum operation Return: sum expression Since: JPA 2.0

Inconsistent return types from JDO query

I'm running a JDO query which returns the sum of an int field.  The return type of the Object ... setResultClass(Long.class) has no effect. sjzlondon Steve Zara The type of a sum expression depends on the type ... the problem. sjzlondon Steve Zara Thank you for this report and for the test. It shows that the sum

Pre-detach loading: retrieval by navigation not working in if statement

: @Transient public Float getNLA_m2_LightingZone() { Float sum = 0f; if (getL_LightingZone() != null ... != null) { sum += area; } else { return null;//POLICY } } } return sum ; } else { return null

Performance issues on aggregate query

we are using this aggregate query to collect some data: select p3.doubleValue,c1.classIdentifier,c1.objectName, sum (p4.doubleValue), sum (p4.doubleValue*p5.doubleValue),0,p7.doubleValue,p3.name,count(o) from ObjectNode o INNER JOIN o.properties p1 INNER JOIN o.properties p2  INNER JOIN o

TypedQuery implementation problems

.id, acct.accountCode, acct.name, acct.parentAccountId, " + " sum (case when att.amount 0 then att.amount else 0 end)," + " sum (case when att.amount 0 then (abs(coalesce(att.amount, 0)) * coalesce

How to add minutes to a Date with JPA2

Hi,  I have to sum to a date of minutes, and check the date obtained is greater than the current date. My idea is as follows: Calendar currentTime = Calendar.getInstance(); Date currenteDate ... ); //minutes to be added I must now sum to the dateCapture the delayMinute and verify that the current date

Getting sales quantity per country with a query, an idea anyone?

containing respectively countries, quantity of orders and sum of orders, per country ... ;          + " SUM (ord.getAmountPaid()) "    

find() cost unreasonable time!

, sons:2 child : 18 child : 19 Iterator time @ 0.000000 The sum : 18 Class of Nodes: @Entity

virtual servers and one file

value and then I try to open several databases in parallel which in sum exceeds the treshhold

Java FX tableview fill with an aggregated query

Dear ObjectDB, Can someone give me a tip, to make the aggregated query work. I am filling a tableview with a normal query "SELECT p From Recept p, with no problem. But when I trying to fill a tableview with an aggregated query : "SELECT SUM (getValue()) AS value ,getUnit() AS unit,getName() AS name

Query Method NullPointerException on List iteration

Hello, i'm new to ObjectDB and want to create a query which sums up the product categories of a supplier. Table Supplier: supplierId   supplierName address List products Table Product: ProductId productName Price ProductCategory categoriy Supplier supplier Table ProductCategory

Examples of queries

Dear ObjectDB, Is there somewhere an example in Java that uses getResultList for a Group by query. Like: SELECT ProductID , SUM (Quantity) FROM OrderDetails Group by ProductID;  Best Regards, Paul paulfo Paul Boon See this sections in the manual regarding SELECT queries that select multiple

ObjectDB 2.6.0

of database file with unexpected HashMap.Entry as a listed type. Fixed return type of SUM queries

ObjectDB 2.5.7

an IllegalAccessError exception when using abstract non public persistable types. Fixed the result type of a sum query on a single value.