public Transaction getTransaction() { return storeDelegate.getTransaction(); }
private static boolean hasTransaction( FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { return featureSource instanceof FeatureStore && (((FeatureStore<? extends FeatureType, ? extends Feature>) featureSource) .getTransaction() != null); }
private static Transaction getTransaction( FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { if (hasTransaction(featureSource)) { return ((FeatureStore<? extends FeatureType, ? extends Feature>) featureSource) .getTransaction(); } return Transaction.AUTO_COMMIT; }
public Transaction getTransaction() { return delegate().getTransaction(); }
private static boolean hasTransaction( FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { return featureSource instanceof FeatureStore && (((FeatureStore<? extends FeatureType, ? extends Feature>) featureSource) .getTransaction() != null); }
private static boolean hasTransaction(FeatureSource featureSource) { return featureSource instanceof FeatureStore && (((FeatureStore) featureSource).getTransaction() != null); }
/** * Returns transaction from featureSource (if it is a FeatureStore), or * Transaction.AUTO_COMMIT if it is not. * * @return Transacstion this FeatureResults opperates against */ protected Transaction getTransaction() { if (featureSource instanceof FeatureStore) { FeatureStore featureStore = (FeatureStore) featureSource; return featureStore.getTransaction(); } else { return Transaction.AUTO_COMMIT; } }
public Transaction getTransaction() { return wrappedStore.getTransaction(); }
public Transaction getTransaction() { return fstore.getTransaction(); }
private static Transaction getTransaction( FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { if (hasTransaction(featureSource)) { return ((FeatureStore<? extends FeatureType, ? extends Feature>) featureSource) .getTransaction(); } return Transaction.AUTO_COMMIT; }
private static Transaction getTransaction(FeatureSource featureSource) { if (hasTransaction(featureSource)) { return ((FeatureStore) featureSource).getTransaction(); } return Transaction.AUTO_COMMIT; }
public Transaction getTransaction() { return delegate().getTransaction(); }
protected void addFeature( int id, Date time, Double elevation, Date referenceTime, Double scanningAngle) throws IOException { FeatureTypeInfo timeElevationCustom = getCatalog().getFeatureTypeByName(TIME_ELEVATION_CUSTOM.getLocalPart()); FeatureStore fs = (FeatureStore) timeElevationCustom.getFeatureSource(null, null); SimpleFeatureType type = (SimpleFeatureType) timeElevationCustom.getFeatureType(); MemoryFeatureCollection coll = new MemoryFeatureCollection(type); StringBuffer content = new StringBuffer(); content.append(id); content.append('|'); content.append(time.toString()); content.append('|'); content.append(elevation); content.append('|'); content.append(referenceTime.toString()); content.append('|'); content.append(scanningAngle); SimpleFeature f = DataUtilities.createFeature(type, content.toString()); coll.add(f); org.geotools.data.Transaction tx = fs.getTransaction(); fs.addFeatures(coll); tx.commit(); }
protected void addFeature(int id, Date time, Double elevation) throws IOException { FeatureTypeInfo timeWithStartEnd = getCatalog().getFeatureTypeByName(TIME_WITH_START_END.getLocalPart()); FeatureStore fs = (FeatureStore) timeWithStartEnd.getFeatureSource(null, null); SimpleFeatureType type = (SimpleFeatureType) timeWithStartEnd.getFeatureType(); MemoryFeatureCollection coll = new MemoryFeatureCollection(type); StringBuffer content = new StringBuffer(); content.append(id); content.append('|'); content.append(time.toString()); content.append("||"); content.append(elevation); content.append('|'); SimpleFeature f = DataUtilities.createFeature(type, content.toString()); coll.add(f); org.geotools.data.Transaction tx = fs.getTransaction(); fs.addFeatures(coll); tx.commit(); }
protected void addFeature(int id, Date time, Double elevation) throws IOException { FeatureTypeInfo timeWithStartEnd = getCatalog().getFeatureTypeByName(ELEVATION_WITH_START_END.getLocalPart()); FeatureStore fs = (FeatureStore) timeWithStartEnd.getFeatureSource(null, null); SimpleFeatureType type = (SimpleFeatureType) timeWithStartEnd.getFeatureType(); MemoryFeatureCollection coll = new MemoryFeatureCollection(type); StringBuffer content = new StringBuffer(); content.append(id); content.append('|'); content.append(time.toString()); content.append("||"); content.append(elevation); content.append('|'); SimpleFeature f = DataUtilities.createFeature(type, content.toString()); coll.add(f); org.geotools.data.Transaction tx = fs.getTransaction(); fs.addFeatures(coll); tx.commit(); }
listener2.events.clear(); store1.getTransaction().commit(); listener2.events.clear(); store1.getTransaction().rollback();
eek.printStackTrace(); try { store.getTransaction().rollback(); } catch (IOException e) { e.printStackTrace();
transaction = ((FeatureStore) currLayer.getFeatureSource()).getTransaction();