Skip to content

Instantly share code, notes, and snippets.

@zznate
Created February 28, 2012 19:05
Show Gist options
  • Save zznate/1934421 to your computer and use it in GitHub Desktop.
Save zznate/1934421 to your computer and use it in GitHub Desktop.
/**
* Creates an HColumn with a column name composite of the form:
* ['country_code']:['state]:['city name'])
* and a value of ['timezone']
* @return
*/
HColumn<Composite,String> staticColumnFrom() {
Composite composite = new Composite();
composite.addComponent(getCountryCode(), StringSerializer.get());
composite.addComponent(getAdmin1Code(), StringSerializer.get());
composite.addComponent(StringEscapeUtils.unescapeCsv(getAsciiName()), StringSerializer.get());
HColumn<Composite,String> col =
HFactory.createColumn(composite, getTimezone(), new CompositeSerializer(), StringSerializer.get());
return col;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment