Created
April 8, 2010 14:16
-
-
Save nazt/360107 to your computer and use it in GitHub Desktop.
This file contains 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
class AirportMapping{ | |
static constraints = { | |
name() | |
iata(maxSize:3) | |
state(maxSize:2) | |
lat() | |
lng() | |
} | |
static mapping = { | |
table "usgs_airports" | |
version false | |
columns { | |
id column: "airport_id" | |
name column: "airport_name" | |
iata column: "locid" | |
state column: "state" | |
lat column: "latitude" | |
lng column: "longitude" | |
} | |
} | |
String name | |
String iata | |
//String city | |
String state | |
//String country = "US" | |
String lat | |
String lng | |
String toString(){ | |
"${iata} - ${name}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment