Closed jmfayard closed 2 years ago
Bonjour,
In our codebase, we have some boring manual mapping functions like this one:
fun mapCDAEntryToEmployee(entry: CDAEntry): Employee { return Employee( id = entry.id(), firstName = entry.getField("firstName") ?: String.EMPTY, lastName = entry.getField("lastName") ?: String.EMPTY, /// ... ) }
That's because we need to call that outside of a TransformQuery
TransformQuery
And TransformQuery seems to be the only place where mapping from a CDAEntry to a POJO via annotations is available https://github.com/contentful/contentful.java/blob/05a333376279ae972433ae2e862c013560d39d0e/src/main/java/com/contentful/java/cda/TransformQuery.java#L349-L465
Would it be possible to add a public API for that?
Hey @jmfayard , unfortunately, we don't have plans to make it a public API any time soon.
Bonjour,
In our codebase, we have some boring manual mapping functions like this one:
That's because we need to call that outside of a
TransformQuery
And
TransformQuery
seems to be the only place where mapping from a CDAEntry to a POJO via annotations is available https://github.com/contentful/contentful.java/blob/05a333376279ae972433ae2e862c013560d39d0e/src/main/java/com/contentful/java/cda/TransformQuery.java#L349-L465Would it be possible to add a public API for that?