org.axonframework.common.property
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>
public class UniformPropertyAccessStrategy
- extends AbstractMethodPropertyAccessStrategy
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
Method Summary |
protected int |
getPriority()
The priority of this strategy. |
protected String |
getterName(String property)
Returns the name of the method that is used to access the property. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniformPropertyAccessStrategy
public UniformPropertyAccessStrategy()
getterName
protected String getterName(String property)
- Description copied from class:
AbstractMethodPropertyAccessStrategy
- Returns the name of the method that is used to access the property.
- Specified by:
getterName
in class AbstractMethodPropertyAccessStrategy
- Parameters:
property
- The property to access
- Returns:
- the name of the method use as accessor
getPriority
protected int getPriority()
- Description copied from class:
PropertyAccessStrategy
- The 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:
getPriority
in class PropertyAccessStrategy
- Returns:
- a value reflecting relative priority,
Integer.MAX_VALUE
being evaluated first
Copyright © 2010-2016. All Rights Reserved.