Entity Bean without attributes


EJB design: Entity Bean without attributes

  1. Entity Bean without attributes (1 messages)

    Can i have an entity bean without any attributes declared.. but it has get and set methods where it gets value from an serializable java object.. i mean, the entity bean bound to a java object.

    For examble i have an java object called Order


    class Order implements Serializable
       private String acNum;

       public String getAccNum()
          return accNum;

    and a OrderBean(EntityBean)

    class OrderBean implements EntityBean
       // all ejb related declarations

       // no attributes

       public String getAccNum(Order o)
         return o.accNum;

    Is this possible..?

    Anyhelp will be highly appriciated..


  2. Entity Bean without attributes[ Go to top ]

    Yes you definately can have this kind of a setup. What i do not get is the senario you want to use this in!!