if (wrapperTypeMap == null){
wrapperTypeMap = new HashMap<String, DmwTypeToWrapperType>();
Iterator<DmwTypeToWrapperType> it = getDmwWrapperType();
if (it != null){
while(it.hasNext()){
DmwTypeToWrapperType curr = it.next();
DmwTypeToWrapperType existing = wrapperTypeMap.get(curr.getDmwType());
if (existing != null)
throw(new IllegalStateException("Multiple dmwWrapperType values with the same context on class " + getName()));
wrapperTypeMap.put(curr.getDmwType(), curr);
}
}
if (getUseWrapperType() == WrapperTypeEnum.EXTENDED){
try {
DmwTypeToWrapperType ttw = new DmwTypeToWrapperType("dmw", WrapperTypeEnum.EXTENDED);
wrapperTypeMap.put(ttw.getDmwType(), ttw);
} catch (DmcValueException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
DmwTypeToWrapperType existing = wrapperTypeMap.get(context);
if (existing == null)
return(WrapperTypeEnum.BASE);
return(existing.getWrapperType());
}