Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

               Note: difference to Query.getSingleResult - not throw NoResultException. 

                  

 

public <T> T getSingleValue(

...

Query<T> query)    

 Get the result of the Hibernate Query or NativeQuery.

 The method reads a scalar value – usually a field – of the first record from the result set of a Query or NativeQuery.

 Returns: T Object or null in the event of an empty result set. 

...

               Note: difference to Query.getSingleResult - not throw NoResultException. 

 

public <T> String getSingleValueAsString(

...

Query<T> query)    

 Get the result of the Hibernate Query or NativeQuery.

 The method reads a scalar value – usually a field – of the first record from the result set of a Query or NativeQuery.

 Returns: String or null in the event of an empty result set. 

...

public <T> T getSingleResultNativeQuery(String sql)     

 Creates Creates a NativeQuery from sql query string and execute <T> T getSingleResult(NativeQuery<T> nativeQuery)

 See <T> T getSingleResult(NativeQuery<T> nativeQuery);    

Query<T> query)

 Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException

...

 Creates a NativeQuery from sql query string and execute <T> Map<String, Object> getSingleResultAsMap(NativeQuery<T> nativeQuery)

 See <T> Map<String, Object> getSingleResultAsMap(NativeQuery<T> nativeQuery);    

 Throws Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException

...

Creates a NativeQuery from sql query string and execute <T> Map<String, String> getSingleResultAsStringMap(NativeQuery<T> nativeQuery, String dateTimeFormat)

See <T> Map<String, String> getSingleResultAsStringMap(NativeQuery<T> nativeQuery, String dateTimeFormat);    

 Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException

...

Creates a NativeQuery from sql query string and execute <T> Map<String, String> getSingleResultAsStringMap(NativeQuery<T> nativeQuery, String dateTimeFormat)

See <T> Map<String, String> getSingleResultAsStringMap(NativeQuery<T> nativeQuery, String dateTimeFormat);                   

 Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException


 

public <T> T getSingleResult(

...

Query<T> query)    

 The method reads one record from a query .

 See <T> T getSingleResult(Query<T> query)

(Query or NativeQuery).

 Throws: SOSHibernateInvalidSessionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException

...

 Creates a NativeQuery from sql query string and execute <T> List<T> getResultList(Query<T> query)

 See <T> List<T> getResultList(Query<T> query);      Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

...

Creates a NativeQuery from sql query string and execute <T> List<Map<String, Object>> getResultListAsMaps(NativeQuery<T> nativeQuery)

See <T> List<Map<String, Object>> getResultListAsMaps(NativeQuery<T> nativeQuery);    

 Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

...

 Creates a NativeQuery from sql query string and execute <T> List<Map<String, String>> getResultListAsStringMaps(NativeQuery<T> nativeQuery, String dateTimeFormat)
 See <T> List<Map<String, String>> getResultListAsStringMaps(NativeQuery<T> nativeQuery, String dateTimeFormat);

 Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

...

Creates a NativeQuery from sql query string and execute <T> List<Map<String, String>> getResultListAsStringMaps(NativeQuery<T> nativeQuery, String dateTimeFormat)
See <T> List<Map<String, String>> getResultListAsStringMaps(NativeQuery<T> nativeQuery, String dateTimeFormat);

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException


public <T> List<T> getResultList(

...

Query<T> query)      

The method reads all records from a query. 
See <T> List<T> getResultList(Query<T> query);query (Query or NativeQuery). 

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

...

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

 

public <T> ScrollableResults scroll(

...

Query<T> query)

The method executes the scroll method with the ScrollMode.FORWARD_ONLY

See ScrollableResults scroll(Query<T> nativeQueryquery, ScrollMode scrollMode);

 

public <T> ScrollableResults scroll(Query<T>

...

query, ScrollMode scrollMode)

The method executes a sql query statements and preserves the result set.

...

Throws: SOSHibernateInvalidSessionException, SOSHibernateConnectionException, SOSHibernateSQLExecutorException

     

 

public

...

int executeUpdate(String... sqls)      

The method executes DML statements as UPDATE, INSERT, DELETE..

Implement a wrapper method for the java.sql.Statement.executeUpdate(String sql)

Returns: The number of entities updated or deleted.

Throws: SOSHibernateInvalidSessionException, SOSHibernateConnectionException, SOSHibernateSQLExecutorException

...

Throws: SOSHibernateInvalidSessionException, SOSHibernateConnectionException, SOSHibernateSQLExecutorException

 

public Map<String,

...

Object> next(ResultSet rs)

The method reads the next record from the result set returned by a query.

...

public int executeUpdate(String hql)      

The method executes statements as UPDATE, INSERT, DELETE..

Implement a wrapper method for the Hibernate executeUpdate.

Creates a Query from HQL/JPQL query string and execute int executeUpdate(Query<?> query).

Returns: See int executeUpdate(Query<?> query)Returns: The number of entities updated or deleted.

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException

...

 Returns: value as String or null in the event of an empty result set.
Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException


public <T> T getSingleValue(Query<T> query)     

The method reads a value of the first record from the result set of a Query.

...

               Note: difference to Query.getSingleResult - not throw NoResultException.

                  

 

public <T> String getSingleValueAsString(Query<T> query)     

 The method reads a value of the first record from the result set of a Query.

...

ThrowsSOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException

         

public <T> T getSingleResult(Query<T> query) 

The method reads one record from a query.

...

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryNonUniqueResultException, SOSHibernateQueryException
               Note: difference to Query.getSingleResult - not throw NoResultException.

 

public <T> List<T>

...

getResultList(String hql) 

Creates a Query from HQL/JPQL query string and execute <T> T getResultList(Query<T> query).

...

ThrowsSOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException
 

public <T> List<T>

...

getResultList(Query<T> query) 

The method reads all records from a query.

...

Throws: SOSHibernateInvalidSessionException, SOSHibernateLockAcquisitionException, SOSHibernateQueryException


public <T> ScrollableResults scroll(Query<T> query)

The method executes the scroll method with the ScrollMode.FORWARD_ONLY

See ScrollableResults scroll(Query<T> query, ScrollMode scrollMode);

 

public <T> ScrollableResults scroll(Query<T> query, ScrollMode scrollMode)

The method executes a sql query statements and preserves the result set.

...