"Inconsistent model version: expected {0}, but was {1}",
model.__tgc__DataModelVersion(), remoteInfo.getModelClassVersion()));
return null;
}
LocalCacheInfo local = repository.getCacheInfo(remoteInfo.getId());
if (local == null) {
LOG.info("TG-IMPORTER-11008", tableName, cacheId);
return null;
}
Calendar timestamp = remoteInfo.getTimestamp();
Calendar localTimestamp = local.getLocalTimestamp();
if (localTimestamp == null || timestamp.compareTo(localTimestamp) > 0) {
LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
"Inconsistent timestamp: expected is <= {0}, but was {1} (local DB was restored from backup?)",
format(localTimestamp), format(timestamp)));
return null;
}
Calendar createdTimestamp = local.getRemoteTimestamp();
if (createdTimestamp != null && timestamp.compareTo(createdTimestamp) < 0) {
LOG.warn("TG-IMPORTER-11010", tableName, cacheId, MessageFormat.format(
"Inconsistent timestamp: expected is >= {0}, but was {1} (remote FS was restored from backup?)",
format(createdTimestamp), format(timestamp)));
return null;