Home / Function/ getMatchOutcome() — spring-boot Function Reference

getMatchOutcome() — spring-boot Function Reference

Architecture documentation for the getMatchOutcome() function in OnRepositoryTypeCondition.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff["getMatchOutcome()"]
  4be1ca61_d1ec_c1b4_bcb4_b39963998430["getMatchOutcome()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| 4be1ca61_d1ec_c1b4_bcb4_b39963998430
  5f3ac574_414e_81b2_13fd_96e2a5074b78["getName()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| 5f3ac574_414e_81b2_13fd_96e2a5074b78
  e3f08cf2_51f6_30d9_9b89_d6e128a29cf3["getTypeProperty()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| e3f08cf2_51f6_30d9_9b89_d6e128a29cf3
  0603596b_b916_9d8c_1e66_83464ed39e67["forCondition()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| 0603596b_b916_9d8c_1e66_83464ed39e67
  5a1c2028_4a8a_cc42_55f6_96a2d5122a9c["because()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| 5a1c2028_4a8a_cc42_55f6_96a2d5122a9c
  bc4686f6_5c18_5823_0aad_cec5e87474cb["noMatch()"]
  7de66c4e_9414_a4da_bd17_0dc6fa4697ff -->|calls| bc4686f6_5c18_5823_0aad_cec5e87474cb
  style 7de66c4e_9414_a4da_bd17_0dc6fa4697ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/OnRepositoryTypeCondition.java lines 40–57

	@Override
	public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
		Map<String, @Nullable Object> attributes = metadata
			.getAnnotationAttributes(ConditionalOnRepositoryType.class.getName(), true);
		Assert.state(attributes != null, "'attributes' must not be null");
		String store = (String) attributes.get("store");
		Assert.state(store != null, "'store' must not be null");
		RepositoryType configuredType = getTypeProperty(context.getEnvironment(), store);
		RepositoryType requiredType = (RepositoryType) attributes.get("type");
		Assert.state(requiredType != null, "'requiredType' must not be null");
		ConditionMessage.Builder message = ConditionMessage.forCondition(ConditionalOnRepositoryType.class);
		if (configuredType == requiredType || configuredType == RepositoryType.AUTO) {
			return ConditionOutcome
				.match(message.because("configured type of '" + configuredType.name() + "' matched required type"));
		}
		return ConditionOutcome.noMatch(message.because("configured type (" + configuredType.name()
				+ ") did not match required type (" + requiredType.name() + ")"));
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does getMatchOutcome() do?
getMatchOutcome() is a function in the spring-boot codebase.
What does getMatchOutcome() call?
getMatchOutcome() calls 6 function(s): because, forCondition, getMatchOutcome, getName, getTypeProperty, noMatch.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free