org.axonframework.common.property
Class BeanPropertyAccessStrategy

java.lang.Object
  extended by org.axonframework.common.property.PropertyAccessStrategy
      extended by org.axonframework.common.property.AbstractMethodPropertyAccessStrategy
          extended by org.axonframework.common.property.BeanPropertyAccessStrategy
All Implemented Interfaces:
Comparable<PropertyAccessStrategy>

public class BeanPropertyAccessStrategy
extends AbstractMethodPropertyAccessStrategy

BeanPropertyAccessStrategy implementation that uses JavaBean style property access. This means that for any given property 'property', a method "getProperty" is expected to provide the property value

Since:
2.0
Author:
Maxim Fedorov, Allard Buijze

Constructor Summary
BeanPropertyAccessStrategy()
           
 
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 org.axonframework.common.property.AbstractMethodPropertyAccessStrategy
propertyFor
 
Methods inherited from class org.axonframework.common.property.PropertyAccessStrategy
compareTo, getProperty, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanPropertyAccessStrategy

public BeanPropertyAccessStrategy()
Method Detail

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.