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
Posted Date:-2022-01-04 08:05:27
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
Posted Date:-2022-01-04 08:04:14
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
Posted Date:-2022-01-04 07:54:42
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
Posted Date:-2022-01-04 08:00:25
To access the database with JDBC:-
1. DAO interface
2.DAO Class
3.DataAccess interface
4.None of the mentioned
Posted Date:-2022-01-04 07:50:43
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
Posted Date:-2022-01-04 07:54:23
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
Posted Date:-2022-01-04 08:05:03
A set of persistent annotations for you to define mapping metadata.
1.JPA
2.JSR
3.XML
4. none of the mentioned
Posted Date:-2022-01-04 08:09:25
An ORM framework persists your objects according to the mapping metadata you provide.
1.True
2.False
3.none
4.all the mentoined
Posted Date:-2022-01-04 07:47:56
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
Posted Date:-2022-01-04 07:53:39
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
Posted Date:-2022-01-04 08:07:16
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
Posted Date:-2022-01-04 07:51:33
Database Engine which uses low memory consumption and easy configuration.
1.SQL
2.MySQL
3.Apache Derby
4.None of the mentioned
Posted Date:-2022-01-04 07:48:26
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
Posted Date:-2022-01-04 08:08:06
For testing purposes, the client/server mode is more appropriate.
1.True
2.False
3.none
4.all the mentoined
Posted Date:-2022-01-04 07:49:14
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
Posted Date:-2022-01-04 08:05:52
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
Posted Date:-2022-01-04 08:08:28
Implementations of the SqlParameterSource interface:-
1.MapSqlParameterSource
2.BeanPropertySqlParameterSource
3.none of the mentioned
4.All of the mentioned
Posted Date:-2022-01-04 08:03:30
JDBC Properties for Connecting to the Application Database.
1. Driver Class
2. URL
3.Username
4.All of the mentioned
Posted Date:-2022-01-04 07:50:00
JdbcTemplate require statement parameters to be passed as an object array.
1.True
2.False
3.none
4.all the mentoined
Posted Date:-2022-01-04 08:00:44
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()
Posted Date:-2022-01-04 08:02:04
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
Posted Date:-2022-01-04 07:57:37
Method to retrieve the JDBC template.
1.setJdbcTemplate()
2.getTemplate()
3.getJdbc()
4.getJdbcTemplate()
Posted Date:-2022-01-04 07:59:45
Method which provides list of maps.
1. queryForList()
2. update
3.query()
4.All of the mentioned
Posted Date:-2022-01-04 07:58:27
Mode which Derby prefers to run in:-
1.embedded
2.client/server
3.all of the mentioned
4.None of the mentioned
Posted Date:-2022-01-04 07:48:55
Named parameters are supported only in SimpleJdbcTemplate.
1.True
2. False
3.all of the mentioned
4.None of the mentioned
Posted Date:-2022-01-04 08:03:04
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
Posted Date:-2022-01-04 08:02:46
ORM which isn’t supported by Spring:-
1.Hibernate
2.JDO
3.TopLink
4.All of the mentioned
Posted Date:-2022-01-04 07:47:06
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
Posted Date:-2022-01-04 07:55:06
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
Posted Date:-2022-01-04 07:57:08
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
Posted Date:-2022-01-04 07:58:03
SimpleJdbcTemplate offers a convenient batch update method in the form of:-
1.Vector
2. Set
3.Map
4.List
Posted Date:-2022-01-04 08:01:39
SingleConnectionDataSource (a DriverManagerDataSource subclass). As its name indicates, this maintains only a single connection.
1.True
2.False
3.none
4.all the mentoined
Posted Date:-2022-01-04 07:52:21
Spring also provides several convenient but less powerful data source implementations.
1.DriverManagerDataSource
2. DriverManagerData
3.DriverManagerDataAccess
4. DriverManagerDataSourceAccess
Posted Date:-2022-01-04 07:51:58
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
Posted Date:-2022-01-04 07:58:54
Spring supports most of the popular ORM (or data mapper) frameworks.
1. Hibernate
2. JDO
3.JPA
4.All of the mentioned
Posted Date:-2022-01-04 07:46:38
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
Posted Date:-2022-01-04 07:51:09
The direct parent class of DataAccessException is:-
1.RuntimeException
2.NestedRuntimeException
3.Exception
4.Throwable
Posted Date:-2022-01-04 08:04:37
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
Posted Date:-2022-01-04 07:50:17
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
Posted Date:-2022-01-04 07:56:20
The JdbcTemplate class offers template method for batch update operations.
1.batchUpdate()
2.update()
3. all of the mentioned
4.None of the mentioned
Posted Date:-2022-01-04 07:55:33
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
Posted Date:-2022-01-04 07:59:12
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
Posted Date:-2022-01-04 07:56:48
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
Posted Date:-2022-01-04 08:02:25
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
Posted Date:-2022-01-04 08:03:53
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
Posted Date:-2022-01-04 08:08:56
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
Posted Date:-2022-01-04 07:49:38
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
Posted Date:-2022-01-04 08:01:14
Which DataSource is not stable in MultiThreaded Environment?
1.DriverManagerDataSource
2. SingleConnectionDataSource
3.All of the mentioned
4.None of the mentioned
Posted Date:-2022-01-04 07:52:50
You implement this interface to override the statement creation task.
1.PreparedStatement
2.PreparedStatementCreator
3.PreparedCreator
4.None of the mentioned
Posted Date:-2022-01-04 07:54:04