Error code for The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint.
1.-1
2.0
3.23505
4.1
In your DAO methods, you neither need to surround the code with a try/catch block nor declare throwing an exception in the method signature.
1.True
2. False
3.none
4.all the mentoined
It is better to implement the PreparedStatementCreator interface and other callback interfaces as inner classes if they are used within one method only.
1.True
2. False
3.none
4.all the mentoined
JdbcTemplate that takes advantage of Java 1.5 features such as autoboxing, generics, and variable-length arguments to simplify its usage.
1. JdbcTemplate that takes advantage of Java 1.5 features such as autoboxing, generics, and variable-length arguments to simplify its usage.
2.org.springframework.jdbc.core.simple.SimpleJdbcTemplate
3. org.springframework.jdbc.*
4.none of the mentioned
To access the database with JDBC:-
1. DAO interface
2.DAO Class
3.DataAccess interface
4.None of the mentioned
When implementing the PreparedStatementCreator interface, you will get the database connection as the createPreparedStatement() method’s argument.
1.True
2.False
3.none
4.all the mentoined
Which concrete exception in the DataAccessException hierarchy should be thrown?
1.errorCode
2. SQLState properties of the caught SQLException
3.All of the mentioned
4. none of the mentioned
A set of persistent annotations for you to define mapping metadata.
1.JPA
2.JSR
3.XML
4. none of the mentioned
An ORM framework persists your objects according to the mapping metadata you provide.
1.True
2.False
3.none
4.all the mentoined
Class which declares a number of overloaded update() template methods to control the overall update process.
1.org.springframework.jdbc.core.JdbcTemplate
2.org.springframework.jdbc.core.*
3.org.springframework.jdbc.*
4.none of the mentioned
Class which represents a real-world entity and its instances will be persisted to a database.
1. entity
2. persistent
3. all of the mentioned
4.None of the mentioned
Data source implementations provided by different vendors and projects.
1. C3PO
2.Apache Commons DBCP
3. All of the mentioned
4.None of the mentioned
Database Engine which uses low memory consumption and easy configuration.
1.SQL
2.MySQL
3.Apache Derby
4.None of the mentioned
Each entity class to be persisted by an ORM framework, a default constructor with no argument is required.
1. True
2. False
3.none
4.all the mentoined
For testing purposes, the client/server mode is more appropriate.
1.True
2.False
3.none
4.all the mentoined
How does the Spring JDBC framework know that state 23505 should be mapped to DuplicateKeyException?
1.error code
2.SQL state
3.all of the mentioned
4. none of the mentioned
If the identifier value is null, this entity will be treated as a new and unsaved entity.
1.True
2.False
3.none
4.None of the mentioned
Implementations of the SqlParameterSource interface:-
1.MapSqlParameterSource
2.BeanPropertySqlParameterSource
3.none of the mentioned
4.All of the mentioned
JDBC Properties for Connecting to the Application Database.
1. Driver Class
2. URL
3.Username
4.All of the mentioned
JdbcTemplate require statement parameters to be passed as an object array.
1.True
2.False
3.none
4.all the mentoined
Method has a warning from the Java compiler because of an unchecked conversion from List to List.
1.findAll()
2.query()
3.update()
4.batchUpdate()
Method of RowMapper interface in which, you have to construct the object that represents a row and return it as the method’s return value.
1.mapRow()
2. query()
3.update()
4.None of the mentioned
Method to retrieve the JDBC template.
1.setJdbcTemplate()
2.getTemplate()
3.getJdbc()
4.getJdbcTemplate()
Method which provides list of maps.
1. queryForList()
2. update
3.query()
4.All of the mentioned
Mode which Derby prefers to run in:-
1.embedded
2.client/server
3.all of the mentioned
4.None of the mentioned
Named parameters are supported only in SimpleJdbcTemplate.
1.True
2. False
3.all of the mentioned
4.None of the mentioned
Named SQL parameters are specified by name (starting with a colon) rather than by position.
1.True
2.False
3.none
4.all the mentoined
ORM which isn’t supported by Spring:-
1.Hibernate
2.JDO
3.TopLink
4.All of the mentioned
PreparedStatementSetter, as its name indicates, create a PreparedStatement object on this connection the parameter as well as binding task of the overall update process.
1.True
2. False
3.none
4.all the mentoined
RowCallbackHandler purpose is to map a single row of the result set to a customized object.
1. True
2.False
3.none
4.all the mentoined
RowMapper implementation which can automatically map a row to a new instance of the specified class.
1.BeanPropertyRowMapper
2.BeanPropertyRow
3. All of the mentioned
4.None of the mentioned
SimpleJdbcTemplate offers a convenient batch update method in the form of:-
1.Vector
2. Set
3.Map
4.List
SingleConnectionDataSource (a DriverManagerDataSource subclass). As its name indicates, this maintains only a single connection.
1.True
2.False
3.none
4.all the mentoined
Spring also provides several convenient but less powerful data source implementations.
1.DriverManagerDataSource
2. DriverManagerData
3.DriverManagerDataAccess
4. DriverManagerDataSourceAccess
Spring JDBC framework offers a convenient class, to simplify your DAO implementation.
1.org.springframework.jdbc.core.support
2. org.springframework.jdbc.core.support.JdbcDaoSupport
3.all of the mentioned
4.None of the mentioned
Spring supports most of the popular ORM (or data mapper) frameworks.
1. Hibernate
2. JDO
3.JPA
4.All of the mentioned
Standard interface defined by the JDBC specification that factories Connection instances.
1.javax.sql.DataAccess
2.javax.sql.DataSource
3. javax.sql.Data
4.javax.sql.DataSourceAccess
The direct parent class of DataAccessException is:-
1.RuntimeException
2.NestedRuntimeException
3.Exception
4.Throwable
The general purpose of the Data Access Object (DAO) pattern is to avoid these logic related problems by separating data access logic from business logic and presentation logic.
1.True
2. False
3.none
4.all the mentoined
The JdbcTemplate class declares a number of overloaded query() template methods to control the overall query process.
1. True
2. False
3.none
4.all the mentoined
The JdbcTemplate class offers template method for batch update operations.
1.batchUpdate()
2.update()
3. all of the mentioned
4.None of the mentioned
The org.springframework.jdbc.core.support.JdbcDaoSupport class has a setDataSource() method and a setJdbcTemplate() method.
1.True
2.False
3.none
4.all the mentoined
The primary interface that allows you to process the current row of the result set
1.PreparedStatementSetter
2.PreparedStatementCreator
3.PreparedStatementCreator
4.All of the mentioned
The return type of the queryForObject() method will be determined by the class argument (e.g., String.class).
1.True
2.False
3.none
4.all the mentoined
The Spring framework offers a consistent data access exception-handling mechanism for its data access module.
1. True
2. False
3.none
4.None of the mentioned
To allow the identifier to be null, you should choose a primitive wrapper type:-
1. java.lang.Integer
2. java.lang.Long
3.all of the mentioned
4.None of the mentioned
To start the Derby server in the client/server mode.
1.startNetworkServer java file
2.startNetworkServer script
3.startNetwork script
4.All of the mentioned
To use SimpleJdbcTemplate:-
1.instantiate it directly
2.retrieve its instance by extending the SimpleJdbcDaoSupport class
3. all of the mentioned
4.None of the mentioned
Which DataSource is not stable in MultiThreaded Environment?
1.DriverManagerDataSource
2. SingleConnectionDataSource
3.All of the mentioned
4.None of the mentioned
You implement this interface to override the statement creation task.
1.PreparedStatement
2.PreparedStatementCreator
3.PreparedCreator
4.None of the mentioned