Created
October 7, 2011 09:26
-
-
Save sheki/1269878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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