}
private static void processCacheModel(Class<?> clazz,
StringBuffer cacheModelSb) {
if (clazz.isAnnotationPresent(Cachemodel.class)) {
Cachemodel annotation = clazz.getAnnotation(Cachemodel.class);
String id = annotation.id();
// 检查当前parameterMap是否已经在其它dao中声明并解析过了
if (cacheModelIds.contains(id))
return;
cacheModelIds.add(id);
String[] flushOnExecute = annotation.flushOnExecute();
cacheModelSb.append(" <cacheModel id=\"" + id
+ "\" type=\"" + annotation.type()
+ "\">");
cacheModelSb.append("\n <flushInterval hours=\""
+ annotation.flushInterval() + "\"/>");
for (String statement : flushOnExecute) {
cacheModelSb.append("\n <flushOnExecute statement=\""
+ statement + "\"/>");
}
Property[] properties = annotation.property();
for(Property property :properties){
cacheModelSb.append("\n <property"+
" name=\""+ property.name() + "\""+
" value=\""+ property.value() + "\""+
"/>");