/**
* Scans metadata to find out if a replicated class is the candidate.
*/
boolean containsReplicated(QueryContext query) {
Class<?> candidate = query.getCandidateType();
DistributedConfiguration conf = (DistributedConfiguration)query.getStoreContext()
.getConfiguration();
if (candidate != null) {
return conf.isReplicated(candidate);
}
ClassMetaData[] metas = query.getAccessPathMetaDatas();
if (metas == null || metas.length < 1)
return false;
for (ClassMetaData meta : metas)
if (conf.isReplicated(meta.getDescribedType()))
return true;
return false;
}