CfDef pCfDef = new CfDef();
pCfDef.name = "PHOTOGRAPHER";
pCfDef.keyspace = "Pickr";
pCfDef.setComparator_type("UTF8Type");
pCfDef.setDefault_validation_class("UTF8Type");
ColumnDef pColumnDef2 = new ColumnDef(ByteBuffer.wrap("PHOTOGRAPHER_NAME".getBytes()), "UTF8Type");
pColumnDef2.index_type = IndexType.KEYS;
pCfDef.addToColumn_metadata(pColumnDef2);
pCfDef.setKey_validation_class("UTF8Type");
CfDef aCfDef = new CfDef();
aCfDef.name = "ALBUM";
aCfDef.keyspace = "Pickr";
aCfDef.setComparator_type("UTF8Type");
aCfDef.setDefault_validation_class("UTF8Type");
ColumnDef columnDef = new ColumnDef(ByteBuffer.wrap("ALBUM_NAME".getBytes()), "UTF8Type");
columnDef.index_type = IndexType.KEYS;
ColumnDef columnDef3 = new ColumnDef(ByteBuffer.wrap("ALBUM_DESC".getBytes()), "UTF8Type");
columnDef3.index_type = IndexType.KEYS;
ColumnDef columnDef5 = new ColumnDef(ByteBuffer.wrap("PHOTOGRAPHER_ID".getBytes()), "UTF8Type");
columnDef5.index_type = IndexType.KEYS;
aCfDef.addToColumn_metadata(columnDef);
aCfDef.addToColumn_metadata(columnDef5);
aCfDef.addToColumn_metadata(columnDef3);
CfDef photoLinkCfDef = new CfDef();
photoLinkCfDef.name = "PHOTO";
photoLinkCfDef.keyspace = "Pickr";
photoLinkCfDef.setComparator_type("UTF8Type");
photoLinkCfDef.setDefault_validation_class("UTF8Type");
ColumnDef columnDef1 = new ColumnDef(ByteBuffer.wrap("PHOTO_CAPTION".getBytes()), "UTF8Type");
columnDef1.index_type = IndexType.KEYS;
ColumnDef columnDef2 = new ColumnDef(ByteBuffer.wrap("PHOTO_DESC".getBytes()), "UTF8Type");
columnDef2.index_type = IndexType.KEYS;
photoLinkCfDef.addToColumn_metadata(columnDef1);
photoLinkCfDef.addToColumn_metadata(columnDef2);
CfDef cfDef = new CfDef();
cfDef.name = "ALBUM_PHOTO";
cfDef.keyspace = "Pickr";
cfDef.setComparator_type("UTF8Type");
cfDef.setDefault_validation_class("UTF8Type");
ColumnDef columnDef4 = new ColumnDef(ByteBuffer.wrap("PHOTO_ID".getBytes()), "UTF8Type");
columnDef1.index_type = IndexType.KEYS;
ColumnDef columnDef6 = new ColumnDef(ByteBuffer.wrap("ALBUM_ID".getBytes()), "UTF8Type");
columnDef2.index_type = IndexType.KEYS;
cfDef.addToColumn_metadata(columnDef4);
cfDef.addToColumn_metadata(columnDef6);
List<CfDef> cfDefs = new ArrayList<CfDef>();