Tag: web technology

Questions Related to web technology

  1. absorbs light

  2. contains proteins

  3. contains sugar

  4. reflects the incident light


Correct Option: D
  1. The code will generate a run time error

  2. undefined, Local Date & Time.

  3. The code will generate a compile time error.

  4. Universal Date & Time, Local Date & Time.

  5. Local Date & Time & Local Date & Time


Correct Option: D
  1. ListResultSet

  2. ResultSet

  3. ScrollableResultSet

  4. ScrollableResult


Correct Option: D
Explanation:

To understand what session.createQuery("Query").scroll() returns, the user needs to have understanding of Hibernate, Java and SQL.

Explanation of each option:

A. ListResultSet: This option is incorrect because ListResultSet is not a valid class in Hibernate.

B. ResultSet: This option is incorrect because ResultSet is a class in Java that represents a table of data representing a database result set, and it is not returned by the scroll() method in Hibernate.

C. ScrollableResultSet: This option is incorrect because ScrollableResultSet is not a valid class in Hibernate.

D. ScrollableResult: This option is correct. The scroll() method in Hibernate returns a ScrollableResult object, which is used to traverse a result set. It provides methods to move the cursor forward and backward, as well as methods to retrieve the current row or a subset of rows.

Therefore, the answer is: D. ScrollableResult.

  1. By using multiple elements inside the element.

  2. By using multiple elements inside the element.

  3. By using multiple elements inside the element.

  4. none of the above


Correct Option: A
  1. By placing hibernate.properties file in the classpath.

  2. Including elements in hibernate.cfg.xml in the classpath.

  3. both 1 and 2

  4. none of the above


Correct Option: C
  1. configuration.buildSessionFactory();

  2. configuration.createSessionFactory();

  3. configuration.createNewSessionFactory();

  4. none of the above


Correct Option: A
  1. SessionFactory.getSession();

  2. SessionFactory.openSession();

  3. SessionFactory.get();

  4. (session)SessionFactory.getObject();


Correct Option: B

Which statement is correct ?

  1. A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed

  2. A Session will obtain a JDBC Connection (or a Datasource) on object create

  3. A Session has no relation with JDBC Connection (or a Datasource)

  4. none of the above


Correct Option: A