Is it possible to create a "unique" constraint dynamically?

Good evening,
Is it possible to create a "unique" constraint dynamically ? by dynamically, I mean programatically instead of using an annotation.
I need this for a @Properties List, for which I do not know the content while in class metadata.

And also, when a constraint is failing, does Neo4J OGM knows for which Node / Relation it is failing and can possibly return it ?