class VideoDataSet { long width long height Geometry groundGeom Date startDate Date endDate static hasMany = [fileObjects: VideoFile] static belongsTo = [repository: Repository] static mapping = { groundGeom type: GeometryType, column: 'ground_geom' } static constraints = { width(min:0L) height(min:0L) groundGeom(nullable:false) startDate(nullable:true) endDate(nullable:true) } def getMainFile() { VideoFile.findByVideoDataSetAndType( this, "main" ) } }