SyncRecords - Synchronize the records to the same row.
@return an error code.
509087
public int syncRecords()
    { // Read a valid record
        if ((this.getOwner().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) == DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)
            return DBConstants.NORMAL_RETURN;   // Don't need to resync if I'm doing a write and refresh.
        m_recordToSync.close();
        return DBConstants.NORMAL_RETURN;
    }
27912
public RecordList getUniqueRecordsBy(String fieldName) {
        Set<String> uniqueKeys = new HashSet<String>();
        final RecordListBuilder uniqueRecordListBuilder = new RecordListBuilder(schema);
        for (int rowIndex = 0; rowIndex < this.size(); rowIndex++) {
            final Record currentRecord = this.records.get(rowIndex);
            String uniqueKeyField = currentRecord.getValueByFieldName(fieldName);
            if(!uniqueKeys.contains(uniqueKeyField)){
                uniqueRecordListBuilder.add(currentRecord);
            }
            uniqueKeys.add(uniqueKeyField);
        }
        return uniqueRecordListBuilder.createRecordList(dataSourceHash);
    }
363470
@Override
    public Record nextRecord() {
        Record next = sequenceRecordReader.nextRecord();
        next.setRecord(transformProcess.execute(next.getRecord()));
        return next;
    }
500470
public Set<ConstraintViolation> validate() {
		Set<ConstraintViolation> errors = new LinkedHashSet<ConstraintViolation>();
		for (int record = 1; record <= 3; ++record) {
			errors.addAll(validate(record));
		}
		return errors;
	}
783404
def setCheckedRecords( self, records ):
        
        QApplication.sendPostedEvents(self, -1)
        indexes = []
        
        for i in range(self.count()):
            record = self.recordAt(i)
            if record is not None and record in records:
                indexes.append(i)
        
        self.setCheckedIndexes(indexes)
1260377
def record_to_objects(self):
        """"""
        from ..util import AttrDict

        fr = self.record

        contents = fr.unpacked_contents

        if not contents:
            return

        ad = AttrDict(contents)


        # Get time that filessystem was synchronized to the File record.
        # Maybe use this to avoid overwriting configs that changed by bundle program.
        # fs_sync_time = self._dataset.config.sync[self.file_const][self.file_to_record]

        self._dataset.config.metadata.set(ad)

        self._dataset._database.commit()

        return ad
1193131
@Override
	public Record nextRecord(Record record) {
		try {
			resultSet.next();
			ResultSetMetaData rsmd = resultSet.getMetaData();
			int column_count = rsmd.getColumnCount();
			record.setNumFields(column_count);

			for (int pos = 0; pos < column_count; pos++) {
				int type = rsmd.getColumnType(pos + 1);
				retrieveTypeAndFillRecord(pos, type, record);
			}
			return record;
		} catch (SQLException e) {
			throw new IllegalArgumentException("Couldn't read data:\t" + e.getMessage());
		} catch (NotTransformableSQLFieldException e) {
			throw new IllegalArgumentException("Couldn't read data because of unknown column sql-type:\t"
				+ e.getMessage());
		} catch (NullPointerException e) {
			throw new IllegalArgumentException("Couldn't access resultSet:\t" + e.getMessage());
		}
	}
207161
public boolean setDataRecord(DataRecord dataRecord)
    {
        boolean success = super.setDataRecord(dataRecord);
        if (this.getCurrentTable() != this.getNextTable())
            this.syncRecordToBase(this.getRecord(), this.getCurrentTable().getRecord(), false);
        return success;
    }
1025522
public StringRecordBuilder<D> addAll(String... records) {
    return addAll(Arrays.asList(checkNotNull(records, "records")));
  }
929946
@Override
    public Record nextRecord() {
        Object[] next = iter.next();
        invokeListeners(next);

        URI location;
        try {
            location = new URI(conn.getMetaData().getURL());
        } catch (SQLException | URISyntaxException e) {
            throw new IllegalStateException("Could not get sql connection metadata", e);
        }

        List<Object> params = new ArrayList<>();
        if (metadataIndices != null) {
            for (int index : metadataIndices) {
                params.add(next[index]);
            }
        }
        RecordMetaDataJdbc rmd = new RecordMetaDataJdbc(location, this.metadataQuery, params, getClass());

        return new org.datavec.api.records.impl.Record(toWritable(next), rmd);
    }
25765
public Iterator<SymbolTable> iterator()
    {
        ArrayList<SymbolTable> tables;

        synchronized (myTablesByName)
        {
            tables = new ArrayList<SymbolTable>(myTablesByName.size());

            // I don't think we can shorten the synchronization block
            // because HashMap.values() result is a live view (not a copy) and
            // thus needs to be synched too.
            Collection<TreeMap<Integer, SymbolTable>> symtabNames =
                myTablesByName.values();
            for (TreeMap<Integer,SymbolTable> versions : symtabNames)
            {
                synchronized (versions)
                {
                    tables.addAll(versions.values());
                }
            }
        }

        return tables.iterator();
    }
927085
public int[] insert(Collection<Entity> records) throws SQLException {
		Connection conn = null;
		try {
			conn = this.getConnection();
			return runner.insert(conn, records);
		} catch (SQLException e) {
			throw e;
		} finally {
			this.closeConnection(conn);
		}
	}
1147941
public synchronized boolean sync() {
		if (!validState) {
			throw new InvalidStateException();
		}
		try {
			fc.force(false);
			return true;
		} catch (Exception e) {
			log.error("Exception in sync()", e);
		}
		return false;
	}
532406
public long numRecords() {
        if (numRecords == null) {
            try {
                numRecords = indexToKey.getNumRecords();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return numRecords;
    }
1044053
public SynchronizationPoint<IOException> onDone() {
		synchronized (buffers) {
			if (writing == null) return new SynchronizationPoint<>(true);
			if (writing.hasError()) return new SynchronizationPoint<IOException>(writing.getError());
			if (writing.isCancelled()) return new SynchronizationPoint<IOException>(writing.getCancelEvent());
			if (waitDone == null) waitDone = new SynchronizationPoint<>();
		}
		return waitDone;
	}
1085053
public Record getAltRecord()
    {
        Record recNext = this.getNextTable().getRecord();
        Iterator<BaseTable> tables = this.getTables();
        while (tables.hasNext())
        {
            Record recAlt = tables.next().getRecord();
            if (recAlt != recNext)
                return recAlt;
        }
        return recNext;
    }
1288799
public List<List<List<String>>> getRecordsAsString() {
        if(records == null)
            Collections.emptyList();
        List<List<List<String>>> ret = new ArrayList<>(records.size());
        for(List<BatchCSVRecord> record : records) {
            List<List<String>> add = new ArrayList<>();
            for(BatchCSVRecord batchCSVRecord : record) {
                for (SingleCSVRecord singleCSVRecord : batchCSVRecord.getRecords()) {
                    add.add(singleCSVRecord.getValues());
                }
            }

            ret.add(add);
        }

        return ret;
    }