@Test public void testValueObjectIdForTuples() { when(domainRegistry.getFactory(Case4DtoVO.class)).thenReturn(new Case4DtoVOFactory()); Case4Dto case4Dto = new Case4Dto(firstName, lastName, "oderItem", "description"); assertThat(underTest.resolveId(case4Dto, Case4DtoVO.class, 0)).isEqualTo(new Case4DtoVO(firstName, lastName)); assertThat(underTest.resolveId(case4Dto, Case4DtoVO.class, 1)).isEqualTo( new Case4DtoVO("oderItem", "description")); }
@Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); @Override boolean supports(D dto); @Override I resolveId(D dto, Class<I> aggregateIdClass); @Override I resolveId(D dto, Class<I> aggregateIdClass, int position); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass, int position); }
AnnotationDtoInfoResolver extends BaseDtoInfoResolver { @Override public <D, I> I resolveId(D dto, Class<I> aggregateIdClass) { ParameterHolder<D> parameterHolder = getIdParameterHolder(dto, aggregateIdClass); return createIdentifier(aggregateIdClass, parameterHolder.uniqueElement(dto), parameterHolder.parameters(dto)); } @Inject  AnnotationDtoInfoResolver(DomainRegistry domainRegistry); @Override boolean supports(D dto); @Override I resolveId(D dto, Class<I> aggregateIdClass); @Override I resolveId(D dto, Class<I> aggregateIdClass, int position); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass); @Override A resolveAggregate(D dto, Class<A> aggregateRootClass, int position);  }