public static boolean isNoCacheGroup(QueryMetadataInterface metadata, Object metadataID, Option option) throws QueryMetadataException, TeiidComponentException { if(option == null || !option.isNoCache()){ return false; } if(option.getNoCacheGroups() == null || option.getNoCacheGroups().isEmpty()){ //only OPTION NOCACHE, no group specified return true; } String fullName = metadata.getFullName(metadataID); for (String groupName : option.getNoCacheGroups()) { if(groupName.equalsIgnoreCase(fullName)){ return true; } } return false; }
public static boolean isNoCacheGroup(QueryMetadataInterface metadata, Object metadataID, Option option) throws QueryMetadataException, TeiidComponentException { if(option == null || !option.isNoCache()){ return false; } if(option.getNoCacheGroups() == null || option.getNoCacheGroups().isEmpty()){ //only OPTION NOCACHE, no group specified return true; } String fullName = metadata.getFullName(metadataID); for (String groupName : option.getNoCacheGroups()) { if(groupName.equalsIgnoreCase(fullName)){ return true; } } return false; }
public static boolean isNoCacheGroup(QueryMetadataInterface metadata, Object metadataID, Option option) throws QueryMetadataException, TeiidComponentException { if(option == null || !option.isNoCache()){ return false; } if(option.getNoCacheGroups() == null || option.getNoCacheGroups().isEmpty()){ //only OPTION NOCACHE, no group specified return true; } String fullName = metadata.getFullName(metadataID); for (String groupName : option.getNoCacheGroups()) { if(groupName.equalsIgnoreCase(fullName)){ return true; } } return false; }
static Option mergeOptions(Option parent, Option child) { if (child == null) { return parent; } if (parent != null && parent.isNoCache() && parent != child) { //merge no cache settings if (parent.getNoCacheGroups() == null || parent.getNoCacheGroups().isEmpty()) { if (child.getNoCacheGroups() != null) { child.getNoCacheGroups().clear(); // full no cache } } else if (child.getNoCacheGroups() != null && !child.getNoCacheGroups().isEmpty()) { for (String noCache : parent.getNoCacheGroups()) { child.addNoCacheGroup(noCache); // only groups } } child.setNoCache(true); } return child; }
static Option mergeOptions(Option parent, Option child) { if (child == null) { return parent; } if (parent != null && parent.isNoCache() && parent != child) { //merge no cache settings if (parent.getNoCacheGroups() == null || parent.getNoCacheGroups().isEmpty()) { if (child.getNoCacheGroups() != null) { child.getNoCacheGroups().clear(); // full no cache } } else if (child.getNoCacheGroups() != null && !child.getNoCacheGroups().isEmpty()) { for (String noCache : parent.getNoCacheGroups()) { child.addNoCacheGroup(noCache); // only groups } } child.setNoCache(true); } return child; }
} else if (obj.isNoCache()) { append(" "); //$NON-NLS-1$ append(NOCACHE);
} else if (obj.isNoCache()) { append(" "); //$NON-NLS-1$ append(NOCACHE);
} else if (obj.isNoCache()) { append(" "); //$NON-NLS-1$ append(NOCACHE);
option = savedOption; } else if (savedOption != null && savedOption.isNoCache() && savedOption != option) { //merge no cache settings if (savedOption.getNoCacheGroups() == null || savedOption.getNoCacheGroups().isEmpty()) { if (option.getNoCacheGroups() != null) {