Class UniformPropertyAccessStrategy
java.lang.Object
org.axonframework.common.property.PropertyAccessStrategy
org.axonframework.common.property.AbstractMethodPropertyAccessStrategy
org.axonframework.common.property.UniformPropertyAccessStrategy
- All Implemented Interfaces:
Comparable<PropertyAccessStrategy>
PropertyAccessStrategy implementation that finds properties defined according to the Uniform Access Principle
(see Wikipedia).
For example, a property called
myProperty, it will use a method called myProperty();- Since:
- 2.0
- Author:
- Maxim Fedorov, Allard Buijze
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intThe priority of this strategy.protected StringgetterName(String property) Returns the name of the method that is used to access the property.Methods inherited from class org.axonframework.common.property.AbstractMethodPropertyAccessStrategy
propertyForMethods inherited from class org.axonframework.common.property.PropertyAccessStrategy
compareTo, getProperty, register, unregister
-
Constructor Details
-
UniformPropertyAccessStrategy
public UniformPropertyAccessStrategy()
-
-
Method Details
-
getterName
Description copied from class:AbstractMethodPropertyAccessStrategyReturns the name of the method that is used to access the property.- Specified by:
getterNamein classAbstractMethodPropertyAccessStrategy- Parameters:
property- The property to access- Returns:
- the name of the method use as accessor
-
getPriority
protected int getPriority()Description copied from class:PropertyAccessStrategyThe priority of this strategy. In general, implementations that have a higher certainty to provide a good Property instance for any given property name should have a higher priority. When two instances have the same priority, their relative order is undefined. The JavaBean Property strategy has a value of 0. To ensure evaluation before that strategy, use any value higher than that number, otherwise lower.- Specified by:
getPriorityin classPropertyAccessStrategy- Returns:
- a value reflecting relative priority,
Integer.MAX_VALUEbeing evaluated first
-