Exforsys.com
 

Sponsored Links

 

SCBCD Tutorials

 
Home Certification SCBCD
 

SCBCD Study Notes : Chapter 6 : Component Contract for Container-Managed Persistence (CMP) (Part 2)

 

SCBCD Study Notes : Chapter 6 : Component Contract for Container-Managed Persistence (CMP) (Part 2) - Page 2

Page 2 of 3



3. One-to-many bidirectional relationships



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Collection entityBeans_B1 = entityBean_A1.getEntityBean_B();;;;;;;;;;;;;;;;;;;
Collection entityBeans_B2 = entityBean_A2.getEntityBean_B();
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.setEntityBean_B(entityBean_A2.getEntityBean_B());;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_A2.getEntityBean_B().isEmpty()) { ... } // true;;;;;;;;;;;;;;;;
if (entityBeans_B2.isEmpty()) { ... } // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_B11.getEntityBean_A() == null) { ... } // true;;;;;;;;;;;;;;;;;
if (entityBean_A1.isIdentical(entityBean_B21.getEntityBean_A())) {;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_B21.setEntityBean_A(entityBean_B11.getEntityBean_A());;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_A1.isIdentical(entityBean_B21.getEntityBean_A())) {;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBeans_B1.contains(entityBean_B21)) { ... } // true
;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.getEntityBean_B().add(entityBean_B21);;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_A1.isIdentical(entityBean_B21.getEntityBean_A())) {;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBeans_B1.contains(entityBean_B21)) { ... } // true;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.getEntityBean_B().remove(entityBean_B12);;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_B12.getEntityBean_A() == null) { ... } // true;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



4. One-to-many unidirectional relationships



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Collection entityBeans_B1 = entityBean_A1.getEntityBean_B();;;;;;;;;;;;;;;;;;;
Collection entityBeans_B2 = entityBean_A2.getEntityBean_B();;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.setEntityBean_B(entityBean_A2.getEntityBean_B());;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_A2.getEntityBean_B().isEmpty()) { ... } // true;;;;;;;;;;;;;;;;
if (entityBeans_B2.isEmpty()) { ... } // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBean_A1.getEntityBean_B().contains(entityBean_B21)) {;;;;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBeans_B1.contains(entityBean_B21)) { ... } // true;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.getEntityBean_B().add(entityBean_B21);;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBeans_B1 == entityBean_A1.getEntityBean_B()) {;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if (entityBeans_B1.contains(entityBean_B21)) { ... } // true;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_A1.getEntityBean_B().remove(entityBean_B12);;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if !(entityBean_A1.getEntityBean_B().contains(entityBean_B12)) {;;;;;;;;;;;;;;
;;;;;;;... // true;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
};;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



5. Many-to-one unidirectional relationships



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if entityBean_A1.isIdentical(entityBean_B11.getEntityBean_A()) { ... } // true
if entityBean_A1.isIdentical(entityBean_B12.getEntityBean_A()) { ... } // true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if entityBean_A2.isIdentical(entityBean_B21.getEntityBean_A()) { ... } // true
if entityBean_A2.isIdentical(entityBean_B22.getEntityBean_A()) { ... } // true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
entityBean_B12.setEntityBean_A(entityBean_B22.getEntityBean_A()); ;;;lllllllll
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if entityBean_A1.isIdentical(entityBean_B11.getEntityBean_A()) { ... } // true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if entityBean_A2.isIdentical(entityBean_B12.getEntityBean_A()) { ... } // true
if entityBean_A2.isIdentical(entityBean_B21.getEntityBean_A()) { ... } // true
if entityBean_A2.isIdentical(entityBean_B22.getEntityBean_A()) { ... } // true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;





Next Page: SCBCD Study Notes : Chapter 6 : Component Contract for Container-Managed Persistence (CMP) (Part 2) - Page 3


Read Next: SCBCD Study Notes : Chapter 6 : Component Contract for Container-Managed Persistence (CMP) (Part 3)



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape