Where is the Entity Meta class

In cuba I had some functions that look like this.
I just sent a type Entity and I was able to access data.

entity.getMetaClass().getProperties()

entity.getMetaClass().getName()
entity.getValue(“code”)

metadataTools.
getAllPersistentMetaClasses()
.stream()

func(Class clazz){
Stream stream = dataManager.loadList(clazz).list().stream();

I was using this to generate template tables to load using poi.

How can I achieve this in JMIX
thank you.

Get entity metaclass and more - Metadata bean.

metadataTools.
getAllPersistentMetaClasses()

Use metadataTools.getAllJpaEntityMetaClasses().

entity.getValue(“code”)

Use EntityValues bean.

Thank you very much for your response !!
Is there an example?
entity.__getEntityEntry().getAttributeValue(“field”)

Id also like to list all the fields in any given enitty
how could I achieve this in JMIX?
entity.getMetaClass().getProperties()

EntityValues.getValue(entity, “field”);
image

metadataTools.getPropertyPaths(metaClass)

The documentation contains links to the description of the API

This is very helpful!!

So this meta class could just be the entity or do i have to find it somewhere else? Could you please provide an example for this? The other one was helpful!!! Thank you !!

metadataTools.getPropertyPaths(metadata.getClass(getEditedEntity().getClass()));

2 Likes

Thank you very much !! This is what I needed !!