protected function getTableMetadata($name, $type = self::META_SCHEMA, $refresh = false)
    {
        $rawName = $this->getRawTableName($name);
        if ($refresh) {
            $this->getTableMetadataRaw($rawName, $type, true);
        }
        if (isset($this->_tableMetadata[$rawName][$type])) {
            return $this->_tableMetadata[$rawName][$type];
        }
        return null;
    }