MetaModel
This module contains the classes that are used to build the internal metamodel by introspecting the domain classes.
Many of the services defined (as interfaces) in the applib have implementations defined in this module (the rest are defined in Runtime Services).
What makes up the metamodel
The classes in this module are used to build up the metamodel from a variety of inputs sources:
@startuml
!include <logos/java>
!include <tupadr3/font-awesome/at>
!include <tupadr3/font-awesome/envira>
!include <office/Databases/database_cube>
!include <material/xml.puml>
legend top
|= notation |= explanation |
| ""__underline__"" | DDD Pattern|
endlegend
together {
rectangle "<$database_cube><$at>\n<<Annotation>>\nORM (JPA)" as PERS
rectangle "<$envira><$at>\n<<Annotation>>\nSpring" as SPRING
rectangle "<img:https://causeway.apache.org/_/img/home/causeway-logo-65x48.png><$at>\n<<Annotation>>\nApache Causeway" as FW
rectangle "<img:https://causeway.apache.org/_/img/home/causeway-logo-65x48.png><$java>\n<<Supporting Methods>>\nApache Causeway" as SM
rectangle "<$java><$ma_xml><$at>\n<<Annotation>>\nJAXB" as JAXB
SPRING -[hidden]- PERS
PERS -[hidden]- FW
FW -[hidden]- SM
SM -[hidden]- JAXB
note left of SPRING
* __Repository__
* Name (@Named)
* Service (via FW @DomainService)
* Component (via FW @DomainObject)
end note
note left of PERS
* Cardinality
* TableName
* Column
** Name
** Length
** Type
end note
note left of FW
* __Entitiy__
** Property
** Collection
** Action
* __Factory__
* Layout
** Property Sequence
(Table and Forms)
** Action Sequence (Menu)
** Styles (cssClass)
* ViewModel
* Mixin
end note
note left of SM
* autoComplete…()
* choices…()
* default…()
* disable…()
* get…()
* hide…()
* iconName()
* set…()
* title()
* validate…()
end note
note left of JAXB
* @XmlAccessorType
* @XmlJavaTypeAdapter
* @XmlRootElement
end note
}
rectangle "<img:https://causeway.apache.org/_/img/home/causeway-logo-65x48.png>\nMetaModel" as MM
SPRING -> MM
PERS -> MM
FW -> MM
SM -> MM
JAXB -> MM
(MetaModelValidation) as MMV
MM <- MMV : perform \n consistency \n check
rectangle "WicketViewer" as UI
database DB
interface "Restful\nObjects" as REST
MM -d-> UI : generate
MM -d-> DB : generate
MM -d-> REST : generate
@enduml
Metamodel Concepts
The metamodel itself consists of the following parts:
@startuml
skinparam nodesep 20
skinparam ranksep 1
together {
(Domain\nObject) as DO
(Entity) as E
(View\nModel) as VM
}
(<i>Apache Causeway</i>) as FW
(Persistence\nLayer) as PL
together {
(Mixin) as M
(Mixee) as ME
}
(Service) as S
(Domain\nService) as DS
(<i>Spring</i>) as SPRING
together {
(Member) as MB
(Property) as P
(Collection) as C
(Action) as A
}
DO <-d-"is a" VM
DO <-d-"is a" E
FW .u.> VM : manages
PL .u.> E : manages
P "is a"-u-> MB
C "is a"-u-> MB
A "is a"-u-> MB
DO --> MB : has 1..*
M "contributes\n a"..> MB
M "contributes\n to"-> ME
DO -> ME : can \n act \n as
SPRING ..> S : manages
DS "is a"-u-> S
DS --> A : has 1..*
@enduml
Thus:
-
Domain Objects have Properties, Collections
-
Viewmodels and Entities are specializations of Domain Objects.
-
View Models are (lifecycle-) managed by Apache Causeway
-
Entities are managed by the configured persistence mechanism.
-
-
Services in general are (lifecycle-) managed by Spring.
Some Services are also included in the metamodel; we call these Domain Services (annotated with @DomainService). Their Actions (like Domain Objects') will be visible either Menu Actions in the Wicket UI and/or through the REST API.
-
Mixins contribute either a Property, a Collection or an Action to their Mixee (-type).