home       edit & win prizes     members     top editors ranking     editors wanted     editor guidelines     contact duno
search:
   my friends   my profile register  login
How Does A Container-managed Relationship Work 
email chief editor    last edit: 31 December 1969
 edit this article & win cash prizes




there is no article on this topic yet. create one



0 dunos vote up vote down Goranimal date added 31 Dec 1969 send private message to Goranimal
Goranimal
Education: University
Degree: Marketing, Business
Job: CEO Goranimal Radio Network
Homepage: www.hotmix106.com..
country code: United States
0 dunos vote up vote down MEESALU date added 31 Dec 1969 send private message to MEESALU
An entity bean accesses related entity beans by means of the accessor methods for its container-managed relationship fields, which are specified by the cmr-field elements of its abstract persistence schema defined in the deployment descriptor. Entity bean relationships are defined in terms of the local interfaces of the related beans, and the view an entity bean presents to its related beans is defined by its local home and local interfaces. Thus, an entity bean can be the target of a relationship from another entity bean only if it has a local interface.
http://www.vaathsalya.com
 reply or leave comment
MEESALU
Education: University
Degree: MCA
Job: Internet Researcher
Homepage: www.dunome.com..
country code: India
0 dunos vote up vote down Janya date added 31 Dec 1969 send private message to Janya
When you work on designing and defining objects, you have to think past the object itself. One of the most important things to define is the relationship between objects. This makes sense: after all, with a data model, we define both entities and relationships.

Seven different types of relationships can be defined:

One-to-one, unidirectional

One-to-one, bidirectional

One-to-many, unidirectional

One-to-many, bidirectional

Many-to-one, unidirectional

Many-to-many, unidirectional

Many-to-many, bidirectional

Unidirectional refers to one object defining the relationship, or you can get from one of the objects to the other but not vice versa. In a bidirectional relationship, both objects define the relationship, or you can get from one object to the other in either direction. The multiplicity determines the roles of the relationship between the two entities. For example, in our project, a Product can have multiple ProductKeys, but a ProductKey can only belong to a single Product; that defines a one-to-many relationship. Through a Product you can attain all its ProductKeys and from a ProductKey you can find out its Product, so this is a bidirectional relationship.

Relationships are defined between entities at a database level by exchanging of entity primary keys where appropriate. In our project, the ProductKey table contains the primary key of the Product table, so we can add as many ProductKey entries as required without having to make any adjustments to the Product table. Queries for a Product's ProductKeys involve obtaining the requested Product's primary key and then querying for all ProductKeys with the product_id that matches the primary key.

ejb-jar.xml
Fortunately, the EJB 2.0 specification abstracts the technical details of defining object relationships. That lets us focus on the relationship itself. We simply need to understand the multiplicity and directionality of the relationship and then define the relationship in the ejb-jar.xml deployment descriptor.


 reply or leave comment
Janya
Education: University
Degree: B.E
Job: Software Professional
Homepage: www.fx-mails.com/pag..
country code: United States

you must register or login
Write comment to this article

the article is How does a container-managed relationship work

your relevant comment

see these articles as well:
How does a container-managed relationship work

or any of these recently updated articles:
notify.php
mediamail.boostmobile.com
mediamail.boostmobile.com
photoupload.php
boost hookt tech@airg.com/administrator/components/com wmtgallery/admin.wmtgallery.php

random article:
Where did Pilgrims land when they arrived in America

IMC International, Inc.