Creates column objects and initializes them.
555767
protected function initColumns()
    {
        foreach ($this->columns as $i => $column) {
            if (is_array($column) && !isset($column['class'])) {
                $this->columns[$i]['class'] = '\TbDataColumn';
            }
        }
        parent::initColumns();
    }
194626
protected void init(Class<T> cls, Key ... keys) {
    	
		// get the columns 
        List<String> targetColumns = new ArrayList<String>();
        Class<?> clazz = cls;
        while( clazz != null && !clazz.equals(Object.class) ) {
            Field[] fields = clazz.getDeclaredFields();
            
            for( Field f : fields ) {
                int m = f.getModifiers();
            
                if( Modifier.isTransient(m) || Modifier.isStatic(m) ) {
                    continue;
                }
                if (f.getType().getName().equals(Collection.class.getName())) {
                	continue; // this is handled by dependency manager
                }
                if( !f.getType().getName().equals(Translator.class.getName()) ) {
                	targetColumns.add(f.getName());    
                	types.put(f.getName(), f.getType());
                }
            }
            clazz = clazz.getSuperclass();
        }
        
        columns = new String[targetColumns.size()];
        
        for (int i = 0; i < targetColumns.size(); i++) {
        	columns[i] = targetColumns.get(i);
        }        
    }
200934
public static List<UserCustomColumn> createRequiredColumns(int startingIndex) {

		List<UserCustomColumn> columns = new ArrayList<>();
		columns.add(createBaseIdColumn(startingIndex++));
		columns.add(createRelatedIdColumn(startingIndex++));

		return columns;
	}
526898
function () {
		
		var columns = this.columns,
			xColumns = [],
			type,
			options = this.options,
			series,
			data,
			i,
			j,
			r,
			seriesIndex,
			chartOptions,
			allSeriesBuilders = [],
			builder,
			freeIndexes,
			typeCol,
			index;

		xColumns.length = columns.length;
		if (options.complete || options.afterComplete) {

			// Get the names and shift the top row
			for (i = 0; i < columns.length; i++) {
				if (this.firstRowAsNames) {
					columns[i].name = columns[i].shift();
				}
			}
			
			// Use the next columns for series
			series = [];
			freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);

			// Populate defined series
			for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
				builder = this.valueCount.seriesBuilders[seriesIndex];

				// If the builder can be populated with remaining columns, then add it to allBuilders
				if (builder.populateColumns(freeIndexes)) {
					allSeriesBuilders.push(builder);
				}
			}

			// Populate dynamic series
			while (freeIndexes.length > 0) {
				builder = new SeriesBuilder();
				builder.addColumnReader(0, 'x');
				
				// Mark index as used (not free)
				index = inArray(0, freeIndexes);
				if (index !== -1) {
					freeIndexes.splice(index, 1);
				}

				for (i = 0; i < this.valueCount.global; i++) {
					// Create and add a column reader for the next free column index
					builder.addColumnReader(undefined, this.valueCount.globalPointArrayMap[i]);
				}

				// If the builder can be populated with remaining columns, then add it to allBuilders
				if (builder.populateColumns(freeIndexes)) {
					allSeriesBuilders.push(builder);
				}
			}

			// Get the data-type from the first series x column
			if (allSeriesBuilders.length > 0 && allSeriesBuilders[0].readers.length > 0) {
				typeCol = columns[allSeriesBuilders[0].readers[0].columnIndex];
				if (typeCol !== undefined) {
					if (typeCol.isDatetime) {
						type = 'datetime';
					} else if (!typeCol.isNumeric) {
						type = 'category';
					}
				}
			}
			// Axis type is category, then the "x" column should be called "name"
			if (type === 'category') {
				for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
					builder = allSeriesBuilders[seriesIndex];
					for (r = 0; r < builder.readers.length; r++) {
						if (builder.readers[r].configName === 'x') {
							builder.readers[r].configName = 'name';
						}
					}
				}
			}

			// Read data for all builders
			for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
				builder = allSeriesBuilders[seriesIndex];

				// Iterate down the cells of each column and add data to the series
				data = [];
				for (j = 0; j < columns[0].length; j++) { // TODO: which column's length should we use here
					data[j] = builder.read(columns, j);
				}

				// Add the series
				series[seriesIndex] = {
					data: data
				};
				if (builder.name) {
					series[seriesIndex].name = builder.name;
				}
				if (type === 'category') {
					series[seriesIndex].turboThreshold = 0;
				}
			}



			// Do the callback
			chartOptions = {
				series: series
			};
			if (type) {
				chartOptions.xAxis = {
					type: type
				};
			}
			
			if (options.complete) {
				options.complete(chartOptions);
			}

			// The afterComplete hook is used internally to avoid conflict with the externally
			// available complete option.
			if (options.afterComplete) {
				options.afterComplete(chartOptions);
			}
		}
	}
1309687
protected function setupObject()
    {
        $this->column = $this->getTable()->getColumn($this->getAttribute("column"));
        $this->translate = $this->getAttribute("translate", $this->getTable()->getDatabase()->getDefaultTranslateMethod());;
    }
1180546
public function init()
	{
		parent::init();

		if (!in_array($this->column->type, $this->supportedTypes)) {
			throw new CException(Yii::t(
				'zii',
				'Unsupported column type. Supported column types are: "{types}"',
				array(
					'{types}' => implode(', ', $this->supportedTypes)
				)
			));
		}
	}
1064290
private List<String[]> buildRows(List<ColumnTypeDataPair> columns) throws BindException
  {
    List<String[]> rows = new ArrayList<>();

    int numColumns = columns.size();
    // columns should have binds
    if (columns.get(0).data.isEmpty())
    {
      throw new BindException("No binds found in first column", BindException.Type.SERIALIZATION);
    }

    int numRows = columns.get(0).data.size();
    // every column should have the same number of binds
    for (int i = 0; i < numColumns; i++)
    {
      int iNumRows = columns.get(i).data.size();
      if (columns.get(i).data.size() != numRows)
      {
        throw new BindException(
            String.format("Column %d has a different number of binds (%d) than column 1 (%d)", i, iNumRows, numRows), BindException.Type.SERIALIZATION);
      }
    }

    for (int rowIdx = 0; rowIdx < numRows; rowIdx++)
    {
      String[] row = new String[numColumns];
      for (int colIdx = 0; colIdx < numColumns; colIdx++)
      {
        row[colIdx] = columns.get(colIdx).data.get(rowIdx);
      }
      rows.add(row);
    }

    return rows;
  }
1177306
protected void initialize() {
        this.mappedFields = new HashMap<String, PropertyDescriptor>();
        PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(mappedClass);
        if (checkProperties) {
            mappedProperties = new HashSet<String>();
        }
        for (int i = 0; i < pds.length; i++) {
            PropertyDescriptor pd = pds[i];
            if (pd.getWriteMethod() != null) {
                if (checkProperties) {
                    this.mappedProperties.add(pd.getName());
                }
                this.mappedFields.put(pd.getName().toLowerCase(), pd);
                for (String underscoredName : underscoreName(pd.getName())) {
                    if (underscoredName != null
                            && !pd.getName().toLowerCase().equals(underscoredName)) {
                        this.mappedFields.put(underscoredName, pd);
                    }
                }
            }
        }
    }
603923
def SetColumns( self, columns, sortOrder=None ):
        """"""
        self.columns = columns 
        self.sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault]
        self.CreateColumns()
763999
public function autosetColumns()
    {
        $value = $this->value;
        if (empty($this->columns)) {
            $dataValue = $value;
            if (count($dataValue)) {
                $firstValue = (array) $dataValue[0];
                foreach (array_keys($firstValue) as $header) {
                    $this->addColumn($header);
                }
            }
        }
    }
1345805
private void init() {

		factories.put(NotEmptyQuery.class,     new NotEmptyQueryFactory(this));
		factories.put(FulltextQuery.class,     new KeywordQueryFactory(this));
		factories.put(SpatialQuery.class,      new SpatialQueryFactory(this));
		factories.put(GroupQuery.class,        new GroupQueryFactory(this));
		factories.put(RangeQuery.class,        new RangeQueryFactory(this));
		factories.put(ExactQuery.class,        new KeywordQueryFactory(this));
		factories.put(ArrayQuery.class,        new ArrayQueryFactory(this));
		factories.put(EmptyQuery.class,        new EmptyQueryFactory(this));
		factories.put(TypeQuery.class,         new TypeQueryFactory(this));
		factories.put(UuidQuery.class,         new UuidQueryFactory(this));
		factories.put(RelationshipQuery.class, new RelationshipQueryFactory(this));
		factories.put(ComparisonQuery.class,   new ComparisonQueryFactory(this));

		converters.put(Boolean.class, new BooleanTypeConverter());
		converters.put(String.class,  new StringTypeConverter());
		converters.put(Date.class,    new DateTypeConverter());
		converters.put(Long.class,    new LongTypeConverter());
		converters.put(Short.class,   new ShortTypeConverter());
		converters.put(Integer.class, new IntTypeConverter());
		converters.put(Float.class,   new FloatTypeConverter());
		converters.put(Double.class,  new DoubleTypeConverter());
		converters.put(byte.class,    new ByteTypeConverter());
	}
565113
protected void onSetColumnNames()
	{
		columnNames = ReflectionExtensions.getDeclaredFieldNames(getType(), "serialVersionUID");
		for(int i = 0; i < columnNames.length; i++){
			columnNames[i] = StringUtils.capitalize(columnNames[i]);
		}
	}
467532
def _construct_columns(self, column_map):
        
        '''  '''
        
        from sqlalchemy import Column, String, Boolean, Integer, Float, Binary 
    
        column_args = []
        for key, value in column_map.items():
            record_key = value[0]
            datatype = value[1]
            max_length = value[2]
            if record_key == 'id':
                if datatype in ('string', 'float', 'integer'):
                    if datatype == 'string':
                        if max_length:
                            column_args.insert(0, Column(record_key, String(max_length), primary_key=True))
                        else:
                            column_args.insert(0, Column(record_key, String, primary_key=True))
                    elif datatype == 'float':
                        column_args.insert(0, Column(record_key, Float, primary_key=True))
                    elif datatype == 'integer':
                        column_args.insert(0, Column(record_key, Integer, primary_key=True))
                else:
                    raise ValueError('Field "id" in record_schema must be a string, float or integer.')
            else:
                if datatype == 'boolean':
                    column_args.append(Column(record_key, Boolean))
                elif datatype == 'string':
                    if max_length:
                        column_args.append(Column(record_key, String(max_length)))
                    else:
                        column_args.append(Column(record_key, String))
                elif datatype == 'float':
                    column_args.append(Column(record_key, Float))
                elif datatype == 'integer':
                    column_args.append(Column(record_key, Integer))
                elif datatype == 'list':
                    column_args.append(Column(record_key, Binary))
        
        return column_args
878276
def build(self, columns):
        
        self.columns = columns
        default = dict(elements.default("default_"),
                       **_safe_get(self.init_style, "default_", {}))
        self.style = elements.adopt({c: default for c in columns},
                                    self.init_style)

        # Store special keys in _style so that they can be validated.
        self.style["default_"] = default
        self.style["header_"] = self._compose("header_", {"align", "width"})
        self.style["aggregate_"] = self._compose("aggregate_",
                                                 {"align", "width"})
        self.style["separator_"] = _safe_get(self.init_style, "separator_",
                                             elements.default("separator_"))
        lgr.debug("Validating style %r", self.style)
        self.style["width_"] = _safe_get(self.init_style, "width_",
                                         elements.default("width_"))
        elements.validate(self.style)
        self._setup_fields()

        ngaps = len(self.columns) - 1
        self.width_separtor = len(self.style["separator_"]) * ngaps
        lgr.debug("Calculated separator width as %d", self.width_separtor)
609316
@SafeVarargs
  public final TableBuilder columns(String... columns) {
    if (columns == null || columns.length == 0) {
      throw new InvalidOperationException("Columns array is null or empty.");
    }
    if (tableColumns != null) {
      throw new InvalidOperationException("The table columns are already defined.");
    }
    tableColumns = columns.clone();
    return this;
  }
200244
protected function initialize()
    {
        $this->id = $this->formatId($this->column);
        $this->group = new Collection();
        $this->name = "{$this->id}-filter-group";

        $this->setupDefaultPresenter();
    }
1274520
private static List<UserCustomColumn> createColumns() {

		List<UserCustomColumn> columns = new ArrayList<>();
		columns.addAll(createRequiredColumns());

		int index = columns.size();
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_NAME,
				GeoPackageDataType.TEXT, false, null));
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_DESCRIPTION,
				GeoPackageDataType.TEXT, false, null));
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_WIDTH,
				GeoPackageDataType.REAL, false, null));
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_HEIGHT,
				GeoPackageDataType.REAL, false, null));
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_ANCHOR_U,
				GeoPackageDataType.REAL, false, null));
		columns.add(UserCustomColumn.createColumn(index++, COLUMN_ANCHOR_V,
				GeoPackageDataType.REAL, false, null));

		return columns;
	}