Skip to content
Snippets Groups Projects

feat: Modify reports output model + update spec

2 unresolved threads

Related to #81 (closed)

Edited by Zachary Sabourin

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
50 */
51 @ObjectFactory
52 default <E extends BareNode> E lookup(String id, @Context PersistenceDao repo, @TargetType Class<E> targetType) {
53 E entity = repo.getReference(id, targetType);
54 if (entity == null) {
55 try {
56 entity = targetType.getConstructor().newInstance();
57 } catch (Exception e) {
58 throw new IllegalStateException("Could not access no-param constructor of entity type", e);
59 }
60 }
61 return entity;
62 }
63
64 @MapperConfig(componentModel = "cdi")
65 public static interface QuarkusMappingConfig {
  • Martin Lowe
  • 37
    38 /**
    39 * Used for generic BareNode lookups. This assumes that the string in the
    40 * inverse is the key of the field. This will
    41 * be used in a lookup of a reference of the object to be used in the DTO mapped
    42 * object.
    43 *
    44 * @param <E> the BareNode actual type
    45 * @param id the string ID of the object to lookup
    46 * @param repo the passed repo context to be used for reference lookups
    47 * @param targetType the injected class type reference
    48 * @return a reference to the target entity if it exists, or a new object to be
    49 * persisted.
    50 */
    51 @ObjectFactory
    52 default <E extends BareNode> E lookup(String id, @Context PersistenceDao repo, @TargetType Class<E> targetType) {
    • We should add this chunk to the base EntityMapper so in the future we can make use of it in the mapper service if needed. I'll create an issue for this

    • Please register or sign in to reply
  • added 1 commit

    • 2d4c6c08 - feat: point to persistence QuarkusMappingConfig

    Compare with previous version

  • Zachary Sabourin added 5 commits

    added 5 commits

    • 2d4c6c08...2c75727e - 4 commits from branch eclipsefdn/it/api:master
    • 74b6edbf - Merge branch 'master' into 'zacharysabourin/master/81'

    Compare with previous version

  • Zachary Sabourin marked this merge request as draft

    marked this merge request as draft

  • Zachary Sabourin marked this merge request as ready

    marked this merge request as ready

  • Martin Lowe approved this merge request

    approved this merge request

  • Martin Lowe mentioned in commit 68609ffb

    mentioned in commit 68609ffb

  • merged

  • Zachary Sabourin changed the description

    changed the description

  • Please register or sign in to reply
    Loading