com.ca.jcs.converter.meta
Class EnumPropertyConverter

java.lang.Object
  extended by com.ca.jcs.cfg.Vetoable
      extended by com.ca.jcs.converter.meta.PropertyConverter
          extended by com.ca.jcs.converter.meta.EnumPropertyConverter
All Implemented Interfaces:
AttributeConverter

public class EnumPropertyConverter
extends PropertyConverter

Convert symbolic values for a enum valued property to numeric form ("Tuesday" in lDAP maps to "2" in connector-speak), if it has a MetaDataDefs.MD_IS_STORE_NUMERIC metadata property which is set to true where enum's symbolic values are replaced by their ordinal values. Does the inverse mapping of numeric to symbolic form ("2" in lDAP maps to "Tuesday" in connector-speak), if property has MetaDataDefs.MD_IS_STORE_SYMBOLIC set to true.


Nested Class Summary
static class EnumPropertyConverter.EnumConfig
           
 
Field Summary
 
Fields inherited from class com.ca.jcs.converter.meta.PropertyConverter
config, prop
 
Constructor Summary
EnumPropertyConverter(DataModelProperty prop)
           
EnumPropertyConverter(EnumPropertyConverter.EnumConfig cfg, DataModelProperty prop)
           
 
Method Summary
 DataModelType getTargetValueOverride()
          Override to return a type if desired, in which case any AttributeConverter registered against this value will be cleared when this property converter is activated for a property.
 
Methods inherited from class com.ca.jcs.converter.meta.PropertyConverter
convertFromConnector, convertToConnector, getAttrConverter, getConfig, getConverter, isLossy, isMultiValued, isStructural, setAttrConverter
 
Methods inherited from class com.ca.jcs.cfg.Vetoable
isVetoed, setVetoed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumPropertyConverter

public EnumPropertyConverter(EnumPropertyConverter.EnumConfig cfg,
                             DataModelProperty prop)

EnumPropertyConverter

public EnumPropertyConverter(DataModelProperty prop)
Method Detail

getTargetValueOverride

public DataModelType getTargetValueOverride()
Description copied from class: PropertyConverter
Override to return a type if desired, in which case any AttributeConverter registered against this value will be cleared when this property converter is activated for a property.

Overrides:
getTargetValueOverride in class PropertyConverter


Created 2011-07-14 13:27 EST