com.loribel.commons.business
Class GB_BOValueMulti

java.lang.Object
  extended bycom.loribel.commons.business.GB_BOValueAbstract
      extended bycom.loribel.commons.business.GB_BOValueMulti
All Implemented Interfaces:
GB_MyPropertyOwner, GB_SimpleBOValue, GB_SimpleBOValueSet, GB_ValuesOwnerSet

public class GB_BOValueMulti
extends GB_BOValueAbstract
implements GB_ValuesOwnerSet

Default implementation of GB_SimpleBOValue for multi values.

Author:
Gregory Borelli

Field Summary
 
Fields inherited from class com.loribel.commons.business.GB_BOValueAbstract
businessObject, property
 
Constructor Summary
GB_BOValueMulti(GB_SimpleBusinessObjectSet a_businessObject, GB_BOProperty a_property)
          Constructor of GB_SimpleBusinessObjectValueMulti with parameter(s).
GB_BOValueMulti(GB_SimpleBusinessObjectSet a_businessObject, java.lang.String a_propertyName)
          Constructor of GB_SimpleBusinessObjectValueMulti with parameter(s).
 
Method Summary
 void addAllValueItem(java.util.Collection a_valueItemList)
          Adds a list of ValueItems to the list valueList.
 boolean addValueItem(java.lang.Object a_valueItem)
          Add a ValueItem to the list valueList.
 boolean addValueItem(java.lang.Object a_valueItem, int a_index)
          Add a ValueItem to the list valueList.
protected  java.util.List buildValueList()
          Method to init valueList.
protected  void checkWithProperty()
           
 java.util.List getInnerValue()
          Returns the true list contained into this container.
 java.lang.Object getValue()
          Returns the value(s) of a property in a Collection.
protected  java.util.List getValueList()
          Get The collection of values..
 int indexOf(java.lang.Object a_value)
          Returns the index of the value a_value.
 void removeAllValueItems()
          Remove all values one by one.
 boolean removeValueItem(java.lang.Object a_valueItem)
          Remove a ValueItem to the list valueList.
 void setValue(java.lang.Object a_value)
          Set the value.
 
Methods inherited from class com.loribel.commons.business.GB_BOValueAbstract
addMyPropertyChangeListener, addMyPropertyChangeListener, fireMyPropertyChange, getBusinessObject, getProperty, getPropertyName, getType, isBusinessObject, isMultiValue, removeMyPropertyChangeListener, removeMyPropertyChangeListener, setBusinessObject, setProperty, setProperty, toString, updateValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GB_BOValueMulti

public GB_BOValueMulti(GB_SimpleBusinessObjectSet a_businessObject,
                       java.lang.String a_propertyName)
Constructor of GB_SimpleBusinessObjectValueMulti with parameter(s).

Parameters:
a_businessObject - GB_SimpleBusinessObjectSet -
a_propertyName - String -

GB_BOValueMulti

public GB_BOValueMulti(GB_SimpleBusinessObjectSet a_businessObject,
                       GB_BOProperty a_property)
Constructor of GB_SimpleBusinessObjectValueMulti with parameter(s).

Parameters:
a_businessObject - GB_SimpleBusinessObjectSet -
a_property - GB_BOProperty -
Method Detail

getValueList

protected java.util.List getValueList()
Get The collection of values.. Use the method buildValueList() to init the property the first time.

Returns:
List - valueList

getInnerValue

public java.util.List getInnerValue()
Returns the true list contained into this container.


buildValueList

protected java.util.List buildValueList()
Method to init valueList.

This method is called by getValueList() to set the value of valueList the first time.

Returns:
List - valueList

addValueItem

public boolean addValueItem(java.lang.Object a_valueItem)
Add a ValueItem to the list valueList.

Specified by:
addValueItem in interface GB_ValuesOwnerSet
Parameters:
a_valueItem - Object - valueItem to add
Returns:
boolean - true if sucess

addValueItem

public boolean addValueItem(java.lang.Object a_valueItem,
                            int a_index)
Add a ValueItem to the list valueList.

Specified by:
addValueItem in interface GB_ValuesOwnerSet
Parameters:
a_valueItem - Object - valueItem to add
Returns:
boolean - true if sucess

addAllValueItem

public void addAllValueItem(java.util.Collection a_valueItemList)
Adds a list of ValueItems to the list valueList.

Specified by:
addAllValueItem in interface GB_ValuesOwnerSet
Parameters:
a_valueItemList - Collection - valueItem to add

removeValueItem

public boolean removeValueItem(java.lang.Object a_valueItem)
Remove a ValueItem to the list valueList.

Specified by:
removeValueItem in interface GB_ValuesOwnerSet
Parameters:
a_valueItem - Object - valueItem à supprimer
Returns:
boolean - true if success

removeAllValueItems

public void removeAllValueItems()
Remove all values one by one.

Specified by:
removeAllValueItems in interface GB_ValuesOwnerSet

getValue

public java.lang.Object getValue()
Returns the value(s) of a property in a Collection. Return a copy of the list of values. Modification of the return does'nt affect the contains of this object. To modify the values of this object, use addValue, removeValue, ...

Specified by:
getValue in interface GB_SimpleBOValue
Returns:
Object

setValue

public void setValue(java.lang.Object a_value)
Set the value.

Parameters:
a_value - Object -

checkWithProperty

protected void checkWithProperty()
Specified by:
checkWithProperty in class GB_BOValueAbstract

indexOf

public int indexOf(java.lang.Object a_value)
Description copied from interface: GB_ValuesOwnerSet
Returns the index of the value a_value.

Specified by:
indexOf in interface GB_ValuesOwnerSet


Copyright © 2002-2007 Gregory Borelli [Loribel]. All Rights Reserved.