XMLDirectMapping cacheTypeMapping = new XMLDirectMapping();
cacheTypeMapping.setAttributeName("m_type");
cacheTypeMapping.setGetMethodName("getType");
cacheTypeMapping.setSetMethodName("setType");
cacheTypeMapping.setConverter(new EnumTypeConverter(cacheTypeMapping, CacheType.class, false));
cacheTypeMapping.setXPath("@type");
descriptor.addMapping(cacheTypeMapping);
XMLDirectMapping alwaysRefreshMapping = new XMLDirectMapping();
alwaysRefreshMapping.setAttributeName("m_alwaysRefresh");
alwaysRefreshMapping.setGetMethodName("getAlwaysRefresh");
alwaysRefreshMapping.setSetMethodName("setAlwaysRefresh");
alwaysRefreshMapping.setXPath("@always-refresh");
descriptor.addMapping(alwaysRefreshMapping);
XMLDirectMapping refreshOnlyIfNewerMapping = new XMLDirectMapping();
refreshOnlyIfNewerMapping.setAttributeName("m_refreshOnlyIfNewer");
refreshOnlyIfNewerMapping.setGetMethodName("getRefreshOnlyIfNewer");
refreshOnlyIfNewerMapping.setSetMethodName("setRefreshOnlyIfNewer");
refreshOnlyIfNewerMapping.setXPath("@refresh-only-if-newer");
descriptor.addMapping(refreshOnlyIfNewerMapping);
XMLDirectMapping disableHitsMapping = new XMLDirectMapping();
disableHitsMapping.setAttributeName("m_disableHits");
disableHitsMapping.setGetMethodName("getDisableHits");
disableHitsMapping.setSetMethodName("setDisableHits");
disableHitsMapping.setXPath("@disable-hits");
descriptor.addMapping(disableHitsMapping);
XMLDirectMapping coordinationTypeMapping = new XMLDirectMapping();
coordinationTypeMapping.setAttributeName("m_coordinationType");
coordinationTypeMapping.setGetMethodName("getCoordinationType");
coordinationTypeMapping.setSetMethodName("setCoordinationType");
coordinationTypeMapping.setConverter(new EnumTypeConverter(coordinationTypeMapping, CacheCoordinationType.class, false));
coordinationTypeMapping.setXPath("@coordination-type");
descriptor.addMapping(coordinationTypeMapping);
return descriptor;
}