public KsDef toThrift() { List<CfDef> cfDefs = new ArrayList<CfDef>(); for (CFMetaData cfm : cfMetaData().values()) cfDefs.add(cfm.toThrift()); KsDef ksdef = new KsDef(name, strategyClass.getName(), cfDefs); ksdef.setStrategy_options(strategyOptions); ksdef.setDurable_writes(durableWrites); return ksdef; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { setName((String) value); } break; case STRATEGY_CLASS: if (value == null) { unsetStrategy_class(); } else { setStrategy_class((String) value); } break; case STRATEGY_OPTIONS: if (value == null) { unsetStrategy_options(); } else { setStrategy_options((Map<String, String>) value); } break; case REPLICATION_FACTOR: if (value == null) { unsetReplication_factor(); } else { setReplication_factor((Integer) value); } break; case CF_DEFS: if (value == null) { unsetCf_defs(); } else { setCf_defs((List<CfDef>) value); } break; case DURABLE_WRITES: if (value == null) { unsetDurable_writes(); } else { setDurable_writes((Boolean) value); } break; } }