org.ow2.util.xmlconfig.mapping
Class ClassMapping

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

public class ClassMapping
extends AbsMapping

Defines a mapping for a given class.

Author:
Florent Benoit

Constructor Summary
ClassMapping()
          Build a default class mapping.
 
Method Summary
 void addAttributeMapping(AttributeMapping attributeMapping)
          Add a given attribute mapping object.
 AttributeMapping getAttributeMapping(java.lang.String attributeName)
          Gets the attribute mapping for the given attribute name.
 java.lang.String getElementAttribute()
           
 void setElementAttribute(java.lang.String elementAttribute)
          Sets the name of the element attribute for this class.
 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

ClassMapping

public ClassMapping()
Build a default class mapping.

Method Detail

getElementAttribute

public java.lang.String getElementAttribute()
Returns:
the name of the attribute to use when finding a value inside this element.

setElementAttribute

public void setElementAttribute(java.lang.String elementAttribute)
Sets the name of the element attribute for this class.

Parameters:
elementAttribute - the value of the attribute to map the XML element.

addAttributeMapping

public void addAttributeMapping(AttributeMapping attributeMapping)
Add a given attribute mapping object.

Parameters:
attributeMapping - the given attribute.

getAttributeMapping

public AttributeMapping getAttributeMapping(java.lang.String attributeName)
Gets the attribute mapping for the given attribute name.

Parameters:
attributeName - the given attribute name.
Returns:
the attribute mapping or null if not found.

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.