Enviar pesquisa
Carregar
Desing pattern
•
Transferir como PPTX, PDF
•
0 gostou
•
798 visualizações
D
dargoro
Seguir
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 11
Baixar agora
Recomendados
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
4.3
4.3
driftmaric
4.2
4.2
driftmaric
Powerpoint technology smart pro and teachers for blog
Powerpoint technology smart pro and teachers for blog
katherinelrobinson
4.22
4.22
driftmaric
Grade 8 Poetry Slide Show
Grade 8 Poetry Slide Show
Rebecca Jardin
Josephine printmaking powerpoint
Josephine printmaking powerpoint
Rebecca Jardin
4.22
4.22
driftmaric
Recomendados
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
4.3
4.3
driftmaric
4.2
4.2
driftmaric
Powerpoint technology smart pro and teachers for blog
Powerpoint technology smart pro and teachers for blog
katherinelrobinson
4.22
4.22
driftmaric
Grade 8 Poetry Slide Show
Grade 8 Poetry Slide Show
Rebecca Jardin
Josephine printmaking powerpoint
Josephine printmaking powerpoint
Rebecca Jardin
4.22
4.22
driftmaric
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
4.22
4.22
driftmaric
Magic square
Magic square
Tomohiko Sawadaishi
Sagrada familia windows
Sagrada familia windows
Rebecca Jardin
Assessment 1
Assessment 1
erinsutherland
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
Grade 7 photography
Grade 7 photography
Rebecca Jardin
Grade 7 Poetry Painting
Grade 7 Poetry Painting
Rebecca Jardin
Surreal Handscapes 9 and 10
Surreal Handscapes 9 and 10
Rebecca Jardin
Software testing
Software testing
DIPEN SAINI
Domain specific Software Architecture
Domain specific Software Architecture
DIPEN SAINI
Mais conteúdo relacionado
Destaque
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
4.22
4.22
driftmaric
Magic square
Magic square
Tomohiko Sawadaishi
Sagrada familia windows
Sagrada familia windows
Rebecca Jardin
Assessment 1
Assessment 1
erinsutherland
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
driftmaric
Grade 7 photography
Grade 7 photography
Rebecca Jardin
Grade 7 Poetry Painting
Grade 7 Poetry Painting
Rebecca Jardin
Surreal Handscapes 9 and 10
Surreal Handscapes 9 and 10
Rebecca Jardin
Software testing
Software testing
DIPEN SAINI
Domain specific Software Architecture
Domain specific Software Architecture
DIPEN SAINI
Destaque
(11)
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
4.22
4.22
Magic square
Magic square
Sagrada familia windows
Sagrada familia windows
Assessment 1
Assessment 1
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
สถาปัตยกรรมเครือข่ายคอมพิวเตอร์
Grade 7 photography
Grade 7 photography
Grade 7 Poetry Painting
Grade 7 Poetry Painting
Surreal Handscapes 9 and 10
Surreal Handscapes 9 and 10
Software testing
Software testing
Domain specific Software Architecture
Domain specific Software Architecture
Desing pattern
1.
2.
Builder PatternM5440047 นายวสุพล
เผือกนำผล
3.
Abstraction Occurrence Solution:
4.
One-to-Many * Manager
Account ตัวอย่าง: ผู้จัดการหนึ่งคน ถือบัญชีได้หลายบัญชี 1 คำแนะนำ: วิธีง่ายที่สุดในการเขียนคำสั่ง ประเภท one-to-many คือใช้คลาส ใน library ของภาษาที่มีมาให้ เช่น ในจาวา ได้แก่ List, Vector, หรืออาจเขียนเป็นอะเรย์เองก็ได้ แต่ยุ่งยาก ในการจัดการ public class Manager { public void addAccount(Account acc) { theAccounts.addElement(acc); } public void removeAccount(Account acc) { theAccounts.removeElement(acc); } private VectortheAccounts; }
5.
6.
* Student StudentGrade
1 public class Student { private List<StudentGrade> grades;}public class StudentGrade { private char letterGrade; private double percentageGrade;}
7.
8.
การใช้ hasMany ตัวอย่าง
ผู้แต่งหนังสือ สามารถแต่หนังหรือได้มากกว่า 1 เล่ม ( one-to-many ) hasManyในการกำหนดความสัมพันธ์แบบ one-to-many class Author { static hasMany = [books:Book]} java.util.SortedSet class Author { SortedSet books static hasMany = [books:Book]} ชนิดของตัวแปรที่กำหนดให้สัมพันธ์กันนั้น จะมี default เป็น java.util.Set
9.
Lists of objects
เก็บ array ไม่จำกัดขนาด และสามารถอ้างถึงข้อมูลด้วย index ใช้งานผ่าน java.util.List class Author { List books static hasMany = [books:Book]} การอ้างถึงข้อมูล author.books[0] // get the first book
10.
11.
Builder Pattern
12.
reference https://sites.google.com/site/thaigrails/gorm/domain-modelling-in-gorm/sets--lists-and-maps http://resource.visual-paradigm.com/java_orm/using_model_api_with_java_persistence_class.html
http://stackoverflow.com/questions/2252377/properly-implementing-a-one-to-many-unidirectional-relationship-in-hibernate http://www.narisa.com/blog/up1/index.php?showentry=1812 http://th.wikipedia.org/wiki/Abstract_factory_pattern http://www.oodesign.com/ http://kunchorn.wordpress.com/2009/06/15/หัวข้อที่สอง-builder-pattern/ http://www.narisa.com/forums/index.php?showtopic=3455 d
Baixar agora