View Javadoc

1   package com.loribel.commons.business.abstraction;
2   
3   /***
4    * Abstraction of a simple BusinessObject.
5    * <br />
6    * A Business Object is defined by a list of property and a list of values :
7    * <ul>
8    *   <li>a property is the description with meta data of a kind of value
9    *   <li>a value is an Object or a collection of Objects for a property
10   * </ul>
11   *
12   * @author Grégory Borelli
13   */
14  public interface GB_SimpleBusinessObject
15          extends
16              GB_BOParentOwner
17  {
18      /***
19       * Returns the BO Name of the objet.
20       * It is an important value, because generaly we can retrieve property
21       * using the BOFactory.
22       *
23       * @return String
24       */
25      String getBOName();
26  
27      /***
28       * Returns the meta data that describe a property.
29       *
30       * @param a_propertyName String -
31       *
32       * @return GB_BOProperty
33       */
34      GB_BOProperty getProperty(
35              String a_propertyName);
36  
37      /***
38       * Returns an array with the property names of this BusinessObject.
39       *
40       * @return String[]
41       */
42      String[] getPropertyNames();
43  
44      /***
45       * Returns the value associated to a property.
46       * This method can return a collection of values if necessary
47       *
48       * @param a_propertyName String -
49       *
50       * @return Object
51       */
52      Object getPropertyValue(
53              String a_propertyName);
54  
55      /***
56       * Returns true if the businessObject is ReadOnly.
57       *
58       * @return boolean
59       */
60      boolean isReadOnly();
61      
62      /***
63       * Returns true if this object has been modified.
64       * If a complex property has been changed, this method may 
65       * return false if no direct modifications has beeen done to the simple properties of this object.
66       * 
67       * @return boolean
68       */
69      boolean isModified();
70  }