Skip to content

Instantly share code, notes, and snippets.

@sheki
Created October 7, 2011 09:26
Show Gist options
  • Select an option

  • Save sheki/1269878 to your computer and use it in GitHub Desktop.

Select an option

Save sheki/1269878 to your computer and use it in GitHub Desktop.
object HostPersistence extends Logging {
import scala.collection.JavaConverters._
def allHostNames() : List[String] ={
val template = DBProvider.writeEndPoint().getSimpleJdbcTemplate
val result= template.queryForList("select * from host")
val buffer = new ListBuffer[String]
for (r <- result) {
buffer+=r.get("host")
}
buffer.toList
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment