/** * Convenience for using transitory data as a flag. Removes the transitory data for this key if one existed. * * @param key the key for the transitory data * @return true if a transitory object is set for the given flag, false otherwise */ public boolean checkAndClearTransitory(String key) { if (hasTransitory(key)) { clearTransitory(key); return true; } return false; }
private static void checkCacheIntegrity(AbstractModel model, JSONProperty<?> property, String transitoryKey) { if (!model.hasTransitory(transitoryKey)) { return; } JSONObjectHolder<?> holder = getJSONTransitory(model, transitoryKey); if (model.containsValue(property) || model.getDefaultValues().containsKey(property.getName())) { String jsonValue = model.get(property); if (SqlUtils.equals(holder.jsonString, jsonValue)) { return; } } model.clearTransitory(transitoryKey); }
/** * Convenience for using transitory data as a flag. Removes the transitory data for this key if one existed. * * @param key the key for the transitory data * @return true if a transitory object is set for the given flag, false otherwise */ public boolean checkAndClearTransitory(String key) { if (hasTransitory(key)) { clearTransitory(key); return true; } return false; }