• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Entity bean question

 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you advise me on this question please?

Statement: "CMP fields must be declared in the entity bean class".

- This question according to HFEJB is said as FALSE. is that cause of "must" ?

- aren't the virtual fields declared in the entity bean object?

Tks in advance!!!
 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
pay attention to the words :

All CMP data fields defined within your bean must be declared within the deployment descriptor in the <cmp-field> element.

And CMP fields must be defined in the entity bean class (with getters/setters)
[ August 07, 2007: Message edited by: Celinio Fernandes ]
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

felipe said:

Could you advise me on this question please?

Statement: "CMP fields must be declared in the entity bean class".

- This question according to HFEJB is said as FALSE. is that cause of "must" ?

- aren't the virtual fields declared in the entity bean object?

Tks in advance!!!



Its true the answer is false

consider these methods in the bean

public abstract void setName(String name)
public abstract void setAge(Integer name)
public abstract String getName()
public abstract Integer getAge()


you dont define the fields like

private String name;
private Integer age;
 
Steven Colley
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, right Celinio and Amol !!!

It does even make sense!!! That's about FIELDS rather than gets/sets!!

Tks so much!!! ;-)
 
I've never won anything before. Not even a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic