@Override
 protected synchronized void initDo() {
   if (!this.closed) {
     synchronized (this.recordStore.getApiSync()) {
       if (this.boundingBox == null) {
         if (this.sql.startsWith("SELECT")) {
           this.rows = this.recordStore.query(this.sql, true);
         } else {
           this.rows =
               this.recordStore.search(this.catalogPath, this.table, this.fields, this.sql, true);
         }
       } else {
         BoundingBox boundingBox = this.boundingBox;
         if (boundingBox.getWidth() == 0) {
           boundingBox = boundingBox.expand(1, 0);
         }
         if (boundingBox.getHeight() == 0) {
           boundingBox = boundingBox.expand(0, 1);
         }
         final com.revolsys.gis.esri.gdb.file.capi.swig.Envelope envelope =
             GeometryConverter.toEsri(boundingBox);
         String sql = this.sql;
         if ("1 = 1".equals(sql)) {
           sql = "";
         }
         this.rows =
             this.recordStore.search(
                 this.catalogPath, this.table, this.fields, sql, envelope, true);
       }
       if (this.rows == null) {
         close();
       }
     }
   }
 }
 public void setBoundingBox(final BoundingBox boundingBox) {
   final RecordDefinition recordDefinition = this.recordDefinition;
   if (recordDefinition != null) {
     this.boundingBox = boundingBox;
     if (boundingBox != null) {
       final FieldDefinition geometryField = recordDefinition.getGeometryField();
       if (geometryField != null) {
         final GeometryFactory geometryFactory =
             geometryField.getProperty(FieldProperties.GEOMETRY_FACTORY);
         if (geometryFactory != null) {
           this.boundingBox = boundingBox.convert(geometryFactory);
         }
       }
     }
   }
 }