Can the primary key in the entity bean be a Java primitive
type such as int?

Answers were Sorted based on User's Feedback



Can the primary key in the entity bean be a Java primitive type such as int?..

Answer / geetanand

IT SHOULD NOT BE PRIMITIVE. IT SHOULD BE AN OBJECT. AND IN
JAVA WE CAN CREATE OBJECTS OF ANY TYPE USING WRAPPER CLASSES.
SO WE CAN USE THIS WRAPPER CLASS OBJECTS.

Is This Answer Correct ?    4 Yes 0 No

Can the primary key in the entity bean be a Java primitive type such as int?..

Answer / kameshwar

The primary key can't be a primitive type--use the
primitive wrapper classes, instead. For example, you can use
java.lang.Integer as the primary key class, but not int (it
has to be a class, not a primitive)

Is This Answer Correct ?    5 Yes 2 No

Post New Answer

More EJB Interview Questions

What is stateless session bean?

0 Answers  


What do you mean by abstract schema?

0 Answers  


explain why we say stateless beans does not maintain conversation state besides statefull maintains conversation state. give some examples...

2 Answers   HCL,


what is the Control flow of an Entity?

1 Answers  


How does ejb invocation happens?

0 Answers  






How to determine two identical beans?

1 Answers  


How stateful session beans will maintain consistency, across transaction updates?

2 Answers  


what is SessionBean, EntityBean?

2 Answers  


what are main features in EJB?

2 Answers  


What are the components of session beam?

0 Answers  


What do you mean by in-memory replication?

0 Answers  


What is stateless and stateful?

0 Answers  


Categories