public function getColumns($table)
    {
        if (!isset($this->_columns[$table])) {
            $fields = $this->_adapter->select('SHOW COLUMNS FROM #__'.$table, AnDatabase::FETCH_ARRAY_LIST);

            static    $column;

            $columns = array();

            foreach ($fields as $field) {
                list($type, $length, $scope) = $this->_parseColumnType($field['Type']);
                $column = $column ? clone $column : new AnDomainResourceColumn();
                $column->name = $field['Field'];
                $column->type = isset($this->_typemap[$type]) ? $this->_typemap[$type] : 'string';
                $column->default = $field['Default'];
                $column->required = $field['Null'] == 'NO';
                $column->primary = $field['Key'] == 'PRI';
                $column->unique = $field['Key'] == 'UNI';
                $columns[$column->name] = $column;
            }

            $this->_columns[$table] = $columns;
        }

        return $this->_columns[$table];
    }