public static ShapePoint shapePoint(String id, int sequence, double lat, double lon) { ShapePoint point = new ShapePoint(); point.setId(sequence); point.setSequence(sequence); point.setLat(lat); point.setLon(lon); point.setShapeId(aid(id)); return point; }
public static ShapePoint shapePoint(String id, int sequence, double lat, double lon) { ShapePoint point = new ShapePoint(); point.setId(sequence); point.setSequence(sequence); point.setLat(lat); point.setLon(lon); point.setShapeId(aid(id)); return point; }
@Override protected void saveElementsForKey(GtfsMergeContext context, AgencyAndId shapeId) { GtfsRelationalDao source = context.getSource(); GtfsMutableRelationalDao target = context.getTarget(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(shapeId)) { shapePoint.setId(0); shapePoint.setSequence(context.getNextSequenceCounter()); target.saveEntity(shapePoint); } }
@Override protected void saveElementsForKey(GtfsMergeContext context, AgencyAndId shapeId) { GtfsRelationalDao source = context.getSource(); GtfsMutableRelationalDao target = context.getTarget(); for (ShapePoint shapePoint : source.getShapePointsForShapeId(shapeId)) { shapePoint.setId(0); shapePoint.setSequence(context.getNextSequenceCounter()); target.saveEntity(shapePoint); } }
for (int index = shapePointFrom; index <= shapePointTo; ++index) { ShapePoint point = new ShapePoint(points.get(index)); point.setId(0); point.setShapeId(newShapeId); dao.saveEntity(point);
for (int index = shapePointFrom; index <= shapePointTo; ++index) { ShapePoint point = new ShapePoint(points.get(index)); point.setId(0); point.setShapeId(newShapeId); dao.saveEntity(point);