@Test public void testValueObjectId() { when(domainRegistry.getFactory(Case2DtoVO.class)).thenReturn(new Case2DtoVOFactory()); Case2DtoVO id = underTest.resolveId(new Case2Dto(firstName, birthDate), Case2DtoVO.class); assertThat(id).isNotNull(); assertThat(id).isEqualTo(new Case2DtoVO(firstName, birthDate)); }
@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);  }