@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { return declaringEntity.modelOf(field.getType()); }
@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { Class<?> entityType = (Class<?>) attributes.get("type"); if (Void.class.equals(entityType)) { entityType = resolveGenericType(field, 0).orElseThrow( () -> new AxonConfigurationException(format( "Unable to resolve entity type of field [%s]. Please provide type explicitly in @AggregateMember annotation.", field.toGenericString() ))); } return declaringEntity.modelOf(entityType); }
@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { Class<?> entityType = (Class<?>) attributes.get("type"); if (Void.class.equals(entityType)) { entityType = resolveGenericType(field, 1).orElseThrow( () -> new AxonConfigurationException(format( "Unable to resolve entity type of field [%s]. Please provide type explicitly in @AggregateMember annotation.", field.toGenericString() ))); } return declaringEntity.modelOf(entityType); }
@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { return declaringEntity.modelOf(field.getType()); }
@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { Class<?> entityType = (Class<?>) attributes.get("type"); if (Void.class.equals(entityType)) { entityType = resolveGenericType(field, 0).orElseThrow( () -> new AxonConfigurationException(format( "Unable to resolve entity type of field [%s]. Please provide type explicitly in @AggregateMember annotation.", field.toGenericString() ))); } return declaringEntity.modelOf(entityType); }
@Override protected <T> EntityModel<Object> extractChildEntityModel(EntityModel<T> declaringEntity, Map<String, Object> attributes, Field field) { Class<?> entityType = (Class<?>) attributes.get("type"); if (Void.class.equals(entityType)) { entityType = resolveGenericType(field, 1).orElseThrow( () -> new AxonConfigurationException(format( "Unable to resolve entity type of field [%s]. Please provide type explicitly in @AggregateMember annotation.", field.toGenericString() ))); } return declaringEntity.modelOf(entityType); }