public Geometry getGeometry ( Object objectToGet ) throws InvalidObjectReaderException { if ( objectToGet == null ) { throw new IllegalArgumentException ( "The given object may not be null" ) ; } if ( objectToGet . getClass ( ) != entityClass ) { throw new InvalidObjectReaderException ( "Class of target object does not correspond with entityclass of this reader." ) ; } if ( geometryAccessor == null ) { return null ; } else { return ( Geometry ) geometryAccessor . getValueFrom ( objectToGet ) ; } }
Will retrieve the value of the geometryfield in the given object . If no geometryfield exists null is returned . If more than one exist a random one is returned .