View Javadoc

1   package org.weda.property;
2   
3   /**Цель: получение значение свойства
4    *
5    * @author tim
6    */
7   public interface PropertyValue {
8       /**Метод возвращает значение свойства. Путь до свойства должен быть
9        * предварительно откомпилирован.
10       * @param propertyPathId - строка идентифицирующая скомпилированный путь 
11       *      до свойства.
12       * @Return значение свойства или null если значение самого свойста равно
13       *      null или свойства левее данного в <code>propertyPath</code>
14       * @see #compile(Class, String)
15       */
16      public Object getValue(Object baseObject, Integer propertyPathId)
17          throws PropertyValueException;
18      public void setValue(Object baseObject, Integer propertyPathId
19              , Object value)
20          throws PropertyValueException;
21      /**Метод компилирует propertyPath.
22       * @param propertyPath - путь до свойства. Т.е. свойство может быть 
23       *      составным, нампример: Допустим есть объект касса Company в котором
24       *      есть свойство address (тип которого Address) у которого в свою 
25       *      очередь есть свойтво <code>street</code>. Тогда 
26       *      <code>propertyPath</code> будет выгядеть следующим образом:
27       *      <code>address.street</code>
28       */
29      public Integer compileGetter(Class baseClass, String propertyPath) 
30          throws PropertyValueException;
31      public Integer compileSetter(Class baseClass, String propertyPath)
32          throws PropertyValueException;
33      public void addGetOperationListener(
34              Class objectClass, String propertyName
35              , PropertyGetOperationListener listener)
36          throws PropertyValueException;
37      public void removeGetListener(PropertyGetOperationListener listener);
38  }