private void mapsXmlColumnFamiliesToColumnFamiliesModel( org.cassandraunit.dataset.xml.Keyspace xmlKeyspace) { if (xmlKeyspace.getColumnFamilies() != null) { /* there is column families to integrate */ for (org.cassandraunit.dataset.xml.ColumnFamily xmlColumnFamily : xmlKeyspace.getColumnFamilies().getColumnFamily()) { keyspace.getColumnFamilies().add(mapXmlColumnFamilyToColumnFamilyModel(xmlColumnFamily)); } } }
private void mapXmlKeyspaceToModel(org.cassandraunit.dataset.xml.Keyspace xmlKeyspace) { /* keyspace */ keyspace = new KeyspaceModel(); keyspace.setName(xmlKeyspace.getName()); /* optional conf */ if (xmlKeyspace.getReplicationFactor() != null) { keyspace.setReplicationFactor(xmlKeyspace.getReplicationFactor()); } if (xmlKeyspace.getStrategy() != null) { keyspace.setStrategy(StrategyModel.fromValue(xmlKeyspace.getStrategy().value())); } mapsXmlColumnFamiliesToColumnFamiliesModel(xmlKeyspace); }