• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMP types

 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Do the abstrat getter methods for CMP have to return object types or can they return primatives? Where is this requirement stated in the spec, if anywhere?
Thanks.
 
David Harrigan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith!
I believe the answer can be deduced from the following. According to the spec, only primitive types and serializable objects can be used for assignments (setters) to cmp-fields for a cmp entity bean. It doesn't explicitly say anything about getters, but I would say that the same rules apply - you can get primitives and serializable objects.
Page 130, last bullet point on the EJB 2.0 spec.
-=david=-
 
David Harrigan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Keith!
I believe the answer can be deduced from the following. According to the spec, only primitive types and serializable objects can be used for assignments (setters) to cmp-fields for a cmp entity bean. It doesn't explicitly say anything about getters, but I would say that the same rules apply - you can get primitives and serializable objects.
Page 130, last bullet point on the EJB 2.0 spec.
-=david=-
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic