Questions tagged [metamodel]

Metamodel is a collection of concepts (frames, rules, terms, constraints, models and theories) that are applicable and useful for modeling a predefined class of problems.

A model is an abstraction of phenomena in the real world; a metamodel is yet another abstraction, highlighting properties of the model itself. A model conforms to its metamodel in the way that a computer program conforms to the grammar of the programming language in which it is written.

Metamodeling, or meta-modeling in software engineering and systems engineering among other disciplines, is the analysis, construction and development of the frames, rules, constraints, models and theories applicable and useful for modeling a predefined class of problems.

Metamodeling is usually defines of a collection of concepts within a certain domain.

cf. wikipedia

225 questions
3
votes
1 answer

JPA - Static metamodel and reserved keywords

My entities have properties that translate to Java keywords. For example there is a Game entity and it has property private: @Entity public class Game { //.... private Boolean PRIVATE; //capitalized to avoid naming issues //no need for…
Maciek
  • 1,696
  • 12
  • 19
3
votes
0 answers

Metamodel API and criteria API

I can`t understand one thing from documentation Oracle. I have POJO, for example: package com.example; ... @Entity public class Pet { @Id protected Long id; protected String name; protected String color; @ManyToOne protected…
KnockKnock
  • 123
  • 2
  • 11
3
votes
1 answer

Metamodel generator for any old class?

I'm finding the JPA metamodel generator functionality really useful for avoiding bugs when column names change. It would be really cool if there was some more general-purpose metamodel generation tool that you could point at any class (or a number…
fancyplants
  • 1,577
  • 3
  • 14
  • 25
3
votes
4 answers

Eclipse (JBoss Developer Studio) not automatically building JPA metamodel classes

I have a Maven project set up that has a parent and two child modules: parent business support All of my JPA entities are in the support module. I've decided I want to use JPA metamodel classes to provide type safety when I use the Criteria…
Chris Williams
  • 11,647
  • 15
  • 60
  • 97
3
votes
1 answer

JPA 2 Delete/Insert order from Metamodel

I'm trying to use the JPA2 metadata to figure out the order to insert/delete rows from a database so constraints are not an issue (to be used later in Java code). This is part of a backup/restore approach using JPA. Here's my approach: Group tables…
javydreamercsw
  • 5,363
  • 13
  • 61
  • 106
3
votes
3 answers

JPA static metamodel classes in EclipseLink throw NullPointerException when accessing attributes

I have a problem with generated static metamodel classes in EclipseLink. In my project I firstly generated static metamodel classed for my entities using: 1) org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor and IntelliJ IDEA and this…
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
3
votes
1 answer

Has Alloy ever been used to specify itself rigorously?

I would like to know if somebody has ever fully specified the Alloy language in Alloy. If such a metamodel exists, is it publicly available?
Loïc Gammaitoni
  • 4,173
  • 16
  • 39
3
votes
0 answers

Using JPA metamodel for @OneToMany mappedBy

Could someone explain what is wrong with this and is there a workaround? private static final String parentField = AbstractType_.parent.getName(); @OneToMany(fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = parentField) private…
Ville Myrskyneva
  • 1,560
  • 3
  • 20
  • 35
3
votes
1 answer

Xtext: Cannot resolve reference

I have the following Xtext grammar: grammar dsl.miniproject.Question2.EclipsePluginLanguage with org.eclipse.xtext.common.Terminals import "platform:/resource/Question2/model/EclipsePluginModel.ecore" import "http://www.eclipse.org/emf/2002/Ecore"…
Jonny
  • 2,787
  • 10
  • 40
  • 62
3
votes
1 answer

JPA Metamodel generation issue

I'm using Eclipse build-in feature to generate JPA metamodel in my projects. Previosly it was generated perfectly, but after that something happened and now my metamodel classes are generated incomplete/wrong. Please note, that entity classes…
Serzhas
  • 854
  • 12
  • 23
3
votes
1 answer

Eclipse reports compilation errors on codes using generated classes

I have a Maven project that uses JPA 2.0 Metamodel. I configured M2e to use maven-processor-plugin and build-helper-maven-plugin during its build lifecycle. The results were that: JPA 2.0 Metamodel classes were generated in…
awiles
  • 31
  • 1
  • 2
3
votes
1 answer

xtext: Relation between AST, Metamodel and parse tree

Can someone explain me the relationship between a parse tree, AST and metamodel. I know so far that xtext derive an EMF Ecore metamodel out of the grammar and generate a parser with antlr. But how will it then be parsed: An input goes first trough…
ph09
  • 1,052
  • 2
  • 20
  • 31
3
votes
5 answers

Generic way to get JPA entity version

I have an unknown JPA entity and need to know it's version. I could not find a way to do this generically. I tried the metamodel, but don't know what to pass to getVersion() method: Object entity = ...; Metamodel metamodel =…
Oliv
  • 10,221
  • 3
  • 55
  • 76
2
votes
2 answers

Can I make an Ecore metamodel that enables models to reference Java classes?

Suppose I want to design an Ecore metamodel that looks something like this, designed to be used to "run" a list of classes: JavaClassRunnerList 0..* JavaClass And assume I have some Java project that has classes named PrintsHello,…
2
votes
1 answer

Is it possible to generate hibernate metamodel for Java 11 and java modules?

I have a java module with JPA entities and persistence.xml and I want to generate metamodel. I tried two variants. Variant 1 org.apache.maven.plugins
Pavel_K
  • 10,748
  • 13
  • 73
  • 186