<commit_before>package com.alvazan.orm.api.spi3.meta;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;

import com.alvazan.orm.api.base.anno.NoSqlEntity;
import com.alvazan.orm.api.base.anno.NoSqlId;
import com.alvazan.orm.api.base.anno.NoSqlInheritance;
import com.alvazan.orm.api.base.anno.NoSqlInheritanceType;
import com.alvazan.orm.api.base.anno.NoSqlManyToOne;
import com.alvazan.orm.api.base.anno.NoSqlTransient;
import com.alvazan.orm.api.spi3.TypedRow;
import com.alvazan.orm.api.spi3.meta.conv.Converters.BaseConverter;
import com.alvazan.orm.api.spi3.meta.conv.StandardConverters;
import com.alvazan.orm.api.spi9.db.Row;

@SuppressWarnings("rawtypes")
@NoSqlEntity
@NoSqlInheritance(subclassesToScan={DboColumnCommonMeta.class, DboColumnToOneMeta.class, DboColumnToManyMeta.class, DboColumnIdMeta.class},
		strategy=NoSqlInheritanceType.SINGLE_TABLE, discriminatorColumnName="classType")
public abstract class DboColumnMeta {

	@NoSqlId
	protected String id;
	
	protected String columnName;

	protected boolean isIndexed;
	
	private String foreignKeyToExtensions;
	
	@NoSqlManyToOne
	protected DboTableMeta owner;
	
	@NoSqlTransient
	private transient byte[] columnAsBytes;
	
	protected transient BaseConverter converter;
	
	public String getId() {
		return id;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setup(DboTableMeta owner2, String colName, boolean isIndexed) {
		if(owner2.getColumnFamily() == null)
			throw new IllegalArgumentException("The owner passed in must have a non-null column family name");
		else if(colName == null)
			throw new IllegalStateException("colName parameter must not be null");
		this.owner = owner2;
		this.columnName = colName;
		owner2.addColumnMeta(this);
		id = owner.getColumnFamily()+":"+columnName;
		this.isIndexed = isIndexed;
	}
	
	public abstract boolean isPartitionedByThisColumn();
	public abstract String getIndexTableName();
	
	public final String getIndexRowKey(String partitionedBy, String partitionId) {
		String firstPart = "/"+owner.getColumnFamily()+"/"+columnName;
		if(partitionedBy == null)
			return firstPart;
		firstPart += "/"+partitionedBy;<commit_msg>make protected<commit_after>package com.alvazan.orm.api.spi3.meta;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;

import com.alvazan.orm.api.base.anno.NoSqlEntity;
import com.alvazan.orm.api.base.anno.NoSqlId;
import com.alvazan.orm.api.base.anno.NoSqlInheritance;
import com.alvazan.orm.api.base.anno.NoSqlInheritanceType;
import com.alvazan.orm.api.base.anno.NoSqlManyToOne;
import com.alvazan.orm.api.base.anno.NoSqlTransient;
import com.alvazan.orm.api.spi3.TypedRow;
import com.alvazan.orm.api.spi3.meta.conv.Converters.BaseConverter;
import com.alvazan.orm.api.spi3.meta.conv.StandardConverters;
import com.alvazan.orm.api.spi9.db.Row;

@SuppressWarnings("rawtypes")
@NoSqlEntity
@NoSqlInheritance(subclassesToScan={DboColumnCommonMeta.class, DboColumnToOneMeta.class, DboColumnToManyMeta.class, DboColumnIdMeta.class},
		strategy=NoSqlInheritanceType.SINGLE_TABLE, discriminatorColumnName="classType")
public abstract class DboColumnMeta {

	@NoSqlId
	protected String id;
	
	protected String columnName;

	protected boolean isIndexed;
	
	private String foreignKeyToExtensions;
	
	@NoSqlManyToOne
	protected DboTableMeta owner;
	
	@NoSqlTransient
	private transient byte[] columnAsBytes;
	
	protected transient BaseConverter converter;
	
	public String getId() {
		return id;
	}

	public String getColumnName() {
		return columnName;
	}

	protected void setup(DboTableMeta owner2, String colName, boolean isIndexed) {
		if(owner2.getColumnFamily() == null)
			throw new IllegalArgumentException("The owner passed in must have a non-null column family name");
		else if(colName == null)
			throw new IllegalStateException("colName parameter must not be null");
		this.owner = owner2;
		this.columnName = colName;
		owner2.addColumnMeta(this);
		id = owner.getColumnFamily()+":"+columnName;
		this.isIndexed = isIndexed;
	}
	
	public abstract boolean isPartitionedByThisColumn();
	public abstract String getIndexTableName();
	
	public final String getIndexRowKey(String partitionedBy, String partitionId) {
		String firstPart = "/"+owner.getColumnFamily()+"/"+columnName;
		if(partitionedBy == null)
			return firstPart;
		firstPart += "/"+partitionedBy;
{'fraction_non_alphanumeric': 0.10369381397418781, 'fraction_numerical': 0.004005340453938585, 'mean_word_length': 5.708955223880597, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '5450427', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1480, 'n_words': 294}