撰写 DSL ——
// lazy loading of attributes
[note: User.passport_number{bg:cornsilk}]-[Entity {bg:orange}]
[Entity ]->[Repository {bg:orange}]
[AttributeMapper ]-.->[Repository ]
[Repository ]->[DataProvider Dispatcher ]
[Criteria ]-.->[Repository ]
[DataProvider Dispatcher ]->[DataProvider ]
[<<DataProvider>> ]^-.-[Default DataProvider ]
[<<DataProvider>> ]^-.-[DataProvider ]
[DataProvider ]performs criteria-.->[DataRecordCache ]
[DataRecordCache ]-.->[DataRecord {bg:orange}]
[DataRecordCache ]-.->[ Entity{bg:orange}]
[DataRecord ]->[ Entity{bg:orange}]
// finder
[note: UserRepository.find(1){bg:cornsilk}]-[id 1]
[id 1]->[Repository]
[AttributeMapper]-.->[Repository{bg:orange}]
[Repository]->[DataProvider Dispatcher]
[Criteria]-.->[Repository]
[DataProvider Dispatcher]->[Default DataProvider]
[<<DataProvider>>]^-.-[Default DataProvider]
[<<DataProvider>>]^-.-[DataProvider]
[Default DataProvider]performs criteria-.->[DataRecordCache]
[DataRecordCache]-.->[DataRecord{bg:orange}]
[DataRecordCache]-.->[Entity{bg:orange}]
[DataRecord]->[Entity{bg:orange}]
然后生成——