Questions tagged [jdoql]

JDOQL is the query language of the JDO persistence API. JDOQL is designed as the Java developers way of having the power of SQL queries, yet retaining the Java object relationship that exist in their application model.

JDOQL is the query language of the JDO persistence API. JDOQL is designed as the Java developers way of having the power of SQL queries, yet retaining the Java object relationship that exist in their application model.

84 questions
1
vote
1 answer

JDOQL DATANUCLEUS filtering using String matches

Using JDO with Datanucleus, I'm trying to filter some data from my database (using jdoql). I would like to use the regular expression for some sophisticated searchs, I found that JDO provide the String method "matches" that accepts a regular…
Jugu
  • 787
  • 1
  • 9
  • 23
1
vote
1 answer

How to do inner join with JDO 1.0

I am working on Healthcare Project which is developed using JDO 1.0. I have googled and i have not found good stuff for JDO 1.0. My problem is that, I have to join two tables Encounter table and History table.The encounter table contains a column…
shukla
  • 57
  • 6
1
vote
1 answer

How does one convert string to number in JDOQL?

I have a JDOQL/DataNucleus storage layer which stores values that can have multiple primitive types in a varchar field. Some of them are numeric, and I need to compare (/...) them with numeric constants. How does one achieve that? I was trying to…
Sergey
  • 636
  • 6
  • 12
1
vote
0 answers

How to get specific entries from a HashMap in JDOQL?

How can I use JDOQL to get a specific entry from a HashMap from the following structure: class User { String username; Map projects; //project name serves as the key } user.setUsername("John"); user.getProjects().add("Test…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
1
vote
1 answer

Java Datanucleus is it possible to use the sql in operator with JDOQL

I am new to datanucleus. Is it possible to use the Sql in operater ind JDOQL in datanucleus? I want to use declerative JDOQL but I cannot figure out how to create a query that does what the SQL In Operater does. SQL Query would look like…
Tarken
  • 2,112
  • 2
  • 23
  • 42
1
vote
1 answer

How to write a JDO Query to sort result based on long attribute?

I want to write a JDO query which fetches all objects of Advertisement class and then sort it on the base of time attribute of type long. For fetching all Advertisement objects, i am using following query. List annonces = null; …
Piscean
  • 3,069
  • 12
  • 47
  • 96
1
vote
1 answer

Is it possible to refer to the outer query from a subquery filter string?

From the subquery filter I refer to the outer query this way: type.maxZoneTests > this.fromZone Query freeZoneSubquery = pm.newQuery(Zone.class, sb.toString()); freeZoneSubquery.setResult("ip.trim()"); outerQuery.addSubquery(freeZoneSubquery, "List…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
1
vote
0 answers

How to write a JDO query to check multiple object attributes with one string parameter?

My Owner class has 6 string attributes. I want to write a JDO query which should check a string with those all 6 attributes of Owner class and if any of those 6 attribute matches then that owner object should be added in list. I am using following…
Piscean
  • 3,069
  • 12
  • 47
  • 96
1
vote
0 answers

Bulk update with datanucleus errors out

I'm trying to use the JDOQL bulk update in datanucleus, but I get the following exception, 12/08/13 13:06:56 INFO DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored 12/08/13 13:06:56 INFO DataNucleus.Persistence:…
0
votes
1 answer

GAE,JDO How to query primary key by Long/long type

I define a base class which have a Long primary key , just like this. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) public class ModelBase implements…
Jump2cn
  • 13
  • 3
0
votes
1 answer

Why is java.lang.Long not persistable?

I am trying to query for a list of ids of type Long in GAE/JDO. And I'm getting the following exception when I call detachCopyAll() on the result set. org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException: The class "The class…
KenSV
  • 21
  • 4
0
votes
1 answer

Escaping string literal "by", sql reserved word, while creating java Query object

The following code is throwing exception because string field has the SQL reserved word "by" in it. How would I escape this reserved word. The code is meant for google datastore. String field="Hosted by me" PersistenceManager…
Win Myo Htet
  • 5,377
  • 3
  • 38
  • 56
0
votes
2 answers

Unable to fetch object by id in JDOQL

I am pretty naive to hbase and JDO. I was trying to use Query q = pm.newQuery(MyClass.class, "id == " + taskId); List taskList = (List)q.execute(); But to my disappointment the list I am receiving is blank. although the taskId in…
devsri
  • 6,173
  • 5
  • 32
  • 40
0
votes
1 answer

Help understanding JDOQL query elements for CMP 1.1 finder

I'm a relative Java EE lightweight, tasked with moving an old app from OC4j 10.x (JEE 1.1) into Glassfish 3.1 (JEE 1.4). I'm attempting to understand what this deployment error means and how I should go about updating my application to address…
Steve Ferguson
  • 792
  • 3
  • 10
  • 21
0
votes
1 answer

Deleting all records from 201 to infinity in JDOQL

Working on a logging feature, I only wish to keep the last 200 records in the datastore. How can I do this in JDOQL? If I'd use SQL it would be as easy as DELETE FROM MyTable OFFSET 201 ORDER BY myDate DESC, but I have a hard time to find something…
doniat
  • 1