Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB - Sharpen Your Pencil - Page 319

 
Aleena Rehman
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the answers to the Sharpen your pencil question, (Q#2), we have not checked the following Virtual Fields:
(1) public abstract String getLast();
(2) public abstract void setLast(String last);
(3) public abstract String getFirst();
(4) public abstract void setFirst(String first);
(5) public abstract String getCustAddress();
(6) public abstract void setCustAddress(String addr);

However, if we leave out these , the class will not compile, as these are being used by the methods which we have developed to match the component interface.

Please help...
Regards,
Aleena
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, good point. I think what they were going for was having abstract getters and setters for the CMP fields is ordinarily only enforced by the EJBC EJB compiler. However, if your class actually makes calls to these methods, then of course the ordinary Java compiler is going to complain if they aren't there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic