Passing ArrayList to SQL query in Java

org.hibernateQuerysetParameterList

Javadoc

Bind multiple values to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in [:value_list].

Popular methods of Query

  • list
    Return the query results as a List. If the query contains multiple results pre row, the results are
  • setParameter
    Bind a value to a named query parameter.
  • uniqueResult
    Convenience method to return a single instance that matches the query, or null if the query returns
  • setMaxResults
    Set the maximum number of rows to retrieve. If not set, there is no limit to the number of rows retr
  • executeUpdate
    Execute the update or delete statement. The semantics are compliant with the ejb3 Query.executeUpda
  • setFirstResult
    Set the first row to retrieve. If not set, rows will be retrieved beginnning from row 0.
  • setString
  • setCacheable
    Enable caching of this query result set.
  • setLong
  • scroll
    Return the query results as ScrollableResults. The scrollability of the returned results depends upo
  • setResultTransformer
    Set a strategy for handling the query results. This can be used to change "shape" of the query resul
  • getQueryString
    Get the query string.
  • setResultTransformer,
  • getQueryString,
  • iterate,
  • setFetchSize,
  • setInteger,
  • setEntity,
  • setCacheRegion,
  • setReadOnly,
  • setTimestamp

Popular in Java

  • Start an intent from android
  • getContentResolver [Context]
  • startActivity [Activity]
  • onCreateOptionsMenu [Activity]
  • PrintWriter [java.io]
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Thread [java.lang]
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URLConnection [java.net]
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • MessageFormat [java.text]
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Stack [java.util]
    Stack is a Last-In/First-Out[LIFO] data structure which represents a stack of objects. It enables u
  • JPanel [javax.swing]
  • Top 15 Vim Plugins

Video liên quan

Chủ Đề