org.infolayer.model
Interface PropertyImpl

All Known Implementing Classes:
PropertyImplJava, PropertyImplLogical, PropertyImplPhysical

public interface PropertyImpl

Property implementation interface. This interface has strict parameter requirements. The translation from relaxed parameter requirements are handled inside UmlPropery. Implementors can assume to get "clean" value parmeters matching the cardinality and not beeing null.


Field Summary
static int SUPPORTS_ADD
           
static int SUPPORTS_REMOVE
           
static int SUPPORTS_SET
           
 
Method Summary
 boolean add(java.lang.Object obj, java.lang.Object value)
          Adds the given value to this property of obj. value must be a single valu, collections are not accepted!
 java.lang.Object get(java.lang.Object obj)
           
 int getSupportedOperations()
          Returns a binary combination of SUPPORTS_ADD, SUPPORTS_SET and SUPPORTS_REMOVE
 boolean remove(java.lang.Object obj, java.lang.Object value)
          Removes the given value from this property of obj. value must be a single value, collections are not accepted!
 void set(java.lang.Object obj, java.lang.Object value)
          Accepts single objects for properties where getMax() == 1, otherwise only collections.
 

Field Detail

SUPPORTS_SET

public static final int SUPPORTS_SET
See Also:
Constant Field Values

SUPPORTS_ADD

public static final int SUPPORTS_ADD
See Also:
Constant Field Values

SUPPORTS_REMOVE

public static final int SUPPORTS_REMOVE
See Also:
Constant Field Values
Method Detail

get

public java.lang.Object get(java.lang.Object obj)

set

public void set(java.lang.Object obj,
                java.lang.Object value)
Accepts single objects for properties where getMax() == 1, otherwise only collections. Any conversions must be handled by UmlProperty(!)


add

public boolean add(java.lang.Object obj,
                   java.lang.Object value)
Adds the given value to this property of obj. value must be a single valu, collections are not accepted! Null values are not supported.

Parameters:
obj - The property owner
value - The value to be added
Returns:
true if anything was changed

remove

public boolean remove(java.lang.Object obj,
                      java.lang.Object value)
Removes the given value from this property of obj. value must be a single value, collections are not accepted! Null values are not supported.

Parameters:
obj - The property owner
value - The value to be added
Returns:
true if anything was changed

getSupportedOperations

public int getSupportedOperations()
Returns a binary combination of SUPPORTS_ADD, SUPPORTS_SET and SUPPORTS_REMOVE