<commit_before>package org.sagebionetworks.repo.model.dbo.persistence;

import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_CHANGE_NUM;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_CHANGE_TYPE;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_ETAG;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_TYPE;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_PARENT_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_TIME_STAMP;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_USER_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.DDL_CHANGES;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.TABLE_CHANGES;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.List;

import org.sagebionetworks.repo.model.dbo.FieldColumn;
import org.sagebionetworks.repo.model.dbo.MigratableDatabaseObject;
import org.sagebionetworks.repo.model.dbo.TableMapping;
import org.sagebionetworks.repo.model.dbo.migration.MigratableTableTranslation;
import org.sagebionetworks.repo.model.migration.MigrationType;

/**
 * Database object used to keep track of all changes that occurred in the repository.
 * 
 * @author jmhill
 *
 */
public class DBOChange implements MigratableDatabaseObject<DBOChange, DBOChange>  {

	private static final FieldColumn[] FIELDS = new FieldColumn[] {
		new FieldColumn("changeNumber", COL_CHANGES_CHANGE_NUM).withIsBackupId(true),
		new FieldColumn("timeStamp", COL_CHANGES_TIME_STAMP),
		new FieldColumn("objectId", COL_CHANGES_OBJECT_ID, true),
		new FieldColumn("parentId", COL_CHANGES_PARENT_ID),
		new FieldColumn("objectType", COL_CHANGES_OBJECT_TYPE, true),
		new FieldColumn("objectEtag", COL_CHANGES_OBJECT_ETAG).withIsEtag(true),
		new FieldColumn("changeType", COL_CHANGES_CHANGE_TYPE),
		new FieldColumn("userId", COL_CHANGES_USER_ID),
	};

	private Long changeNumber;
	private Timestamp timeStamp;
	private Long objectId;<commit_msg>Changes is an immutable table, migration does not depend on etag<commit_after>package org.sagebionetworks.repo.model.dbo.persistence;

import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_CHANGE_NUM;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_CHANGE_TYPE;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_ETAG;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_OBJECT_TYPE;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_PARENT_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_TIME_STAMP;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.COL_CHANGES_USER_ID;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.DDL_CHANGES;
import static org.sagebionetworks.repo.model.query.jdo.SqlConstants.TABLE_CHANGES;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.List;

import org.sagebionetworks.repo.model.dbo.FieldColumn;
import org.sagebionetworks.repo.model.dbo.MigratableDatabaseObject;
import org.sagebionetworks.repo.model.dbo.TableMapping;
import org.sagebionetworks.repo.model.dbo.migration.MigratableTableTranslation;
import org.sagebionetworks.repo.model.migration.MigrationType;

/**
 * Database object used to keep track of all changes that occurred in the repository.
 * 
 * @author jmhill
 *
 */
public class DBOChange implements MigratableDatabaseObject<DBOChange, DBOChange>  {

	private static final FieldColumn[] FIELDS = new FieldColumn[] {
		new FieldColumn("changeNumber", COL_CHANGES_CHANGE_NUM).withIsBackupId(true),
		new FieldColumn("timeStamp", COL_CHANGES_TIME_STAMP),
		new FieldColumn("objectId", COL_CHANGES_OBJECT_ID, true),
		new FieldColumn("parentId", COL_CHANGES_PARENT_ID),
		new FieldColumn("objectType", COL_CHANGES_OBJECT_TYPE, true),
		new FieldColumn("objectEtag", COL_CHANGES_OBJECT_ETAG),
		new FieldColumn("changeType", COL_CHANGES_CHANGE_TYPE),
		new FieldColumn("userId", COL_CHANGES_USER_ID),
	};

	private Long changeNumber;
	private Timestamp timeStamp;
	private Long objectId;
{'fraction_non_alphanumeric': 0.09329829172141918, 'fraction_numerical': 0.0, 'mean_word_length': 7.273550724637682, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5048221', 'n_tokens_mistral': 1607, 'n_tokens_neox': 1599, 'n_words': 237}