ObjectDB ObjectDB

Internal Website Search

1-10 of 102 resultsRefresh
164

_PersistenceException: Type is not found on getSingleResult.

_PersistenceException: Type is not found on getSingleResult.
102

getSingleResult()

Method javax.persistence.Query Object getSingleResult() Execute a SELECT query that returns a single untyped result. Returns: the result Throws: NoResultException - if there is no result NonUniqueResultException - if more than one result IllegalStateException - if called for a Java Persistence
102

getSingleResult()

Method javax.persistence.TypedQuery X getSingleResult() Execute a SELECT query that returns a single result. Returns: the result Throws: NoResultException - if there is no result NonUniqueResultException - if more than one result IllegalStateException - if called for a Java Persistence query
41

Running JPA Queries

The Query interface defines two methods for running SELECT queries: Query.getSingleResult - for use ... . Similarly, the TypedQuery interface defines the following methods: TypedQuery.getSingleResult ... Execution (with getSingleResult) The getResultList method (which was discussed above) can also be used
29

Query Parameters in JPA

("name", name).getSingleResult(); } The WHERE clause reduces the query results to Country objects ... on which it was invoked), so invocation of getSingleResult can be chained to the same expression ... .setParameter(1, name).getSingleResult(); } The form of ordinal parameters is a question mark
29

CRUD Database Operations with JPA

Point p"); System.out.println("Total Points: " + q1.getSingleResult()); The query string ("SELECT ... . The getSingleResult method executes the query and returns the result. It should only be used ... Point p"); System.out.println("Average X: " + q2.getSingleResult()); The new query returns
29

Online Backup

").getSingleResult(); The backup query string is always exactly "objectdb backup". The backup is created ... ("target", new java.io.File("c:\\backup"));     backupQuery.getSingleResult(); The code ... ", "backup"); backupQuery.getSingleResult(); When a string is specified as a value for the target
14

Setting and Tuning of JPA Queries

The Query and TypedQuery interfaces define various setting and tuning methods that may affect query execution if invoked before a query is run using getResultList or getSingleResult. Result Range (setFirstResult, setMaxResults) The setFirstResult and setMaxResults methods enable defining a result
4

Step 3: Add a Main Class

"); System.out.println("Total Points: " + q1.getSingleResult()); // Find the average X ... "); System.out.println("Average X: " + q2.getSingleResult()); // Retrieve all the Point objects from
4

Step 3: Add a Main Class

"); System.out.println("Total Points: " + q1.getSingleResult()); // Find the average X value ... : " + q2.getSingleResult()); // Retrieve all the Point objects from the database

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support