org.ow2.util.xmlconfig.mapping
Class AttributeMapping

java.lang.Object
  extended by org.ow2.util.xmlconfig.mapping.AbsMapping
      extended by org.ow2.util.xmlconfig.mapping.AttributeMapping

public class AttributeMapping
extends AbsMapping

Defines a mapping for attributes of a class.

Author:
Florent Benoit

Constructor Summary
AttributeMapping()
           
 
Method Summary
 java.lang.String getGetter()
           
 java.lang.String getSetter()
           
 boolean isElement()
          Is that this attribute is mapped to an XML element ?
 boolean isListElement()
          Is that this attribute should be considered as a list ?
 boolean isOptional()
          Is that this attribute should be considered as optional ?
 void setElement()
          This attribute is mapped to an XML element ?
 void setGetter(java.lang.String getter)
          Sets the getter for this attribute.
 void setListElement()
          This attribute is considered as a List.
 void setOptional()
          This attribute is considered optional.
 void setSetter(java.lang.String setter)
          Sets the setter for this attribute.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.ow2.util.xmlconfig.mapping.AbsMapping
getAliases, getName, setAliases, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeMapping

public AttributeMapping()
Method Detail

setElement

public void setElement()
This attribute is mapped to an XML element ?


isElement

public boolean isElement()
Is that this attribute is mapped to an XML element ?

Returns:
true if it the case

setListElement

public void setListElement()
This attribute is considered as a List.


isListElement

public boolean isListElement()
Is that this attribute should be considered as a list ?

Returns:
true if it the case

getGetter

public java.lang.String getGetter()
Returns:
the getter for this attribute.

setGetter

public void setGetter(java.lang.String getter)
Sets the getter for this attribute.

Parameters:
getter - the given getter name

getSetter

public java.lang.String getSetter()
Returns:
the setter for this attribute.

setSetter

public void setSetter(java.lang.String setter)
Sets the setter for this attribute.

Parameters:
setter - the given setter name

setOptional

public void setOptional()
This attribute is considered optional.


isOptional

public boolean isOptional()
Is that this attribute should be considered as optional ?

Returns:
true if it the case

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class AbsMapping
Returns:
string representation


Copyright © 2007-2009 OW2 Consortium. All Rights Reserved.