Set the TableAlias for ClassDescriptor
500336
private void setTableAliasForClassDescriptor(ClassDescriptor aCld, TableAlias anAlias)
    {
        if (m_cldToAlias.get(aCld) == null)
        {
            m_cldToAlias.put(aCld, anAlias);
        }    
    }
1034399
public void modifyColumns(final String tableName, HColumnDescriptor descriptor)
      throws IOException {
    modifyColumn(TableName.valueOf(tableName), descriptor);
  }
44446
public void setTableIndex(TableIndex tableIndex) {
		this.tableIndex = tableIndex;
		if (tableIndex != null) {
			tableName = tableIndex.getTableName();
		} else {
			tableName = null;
		}
	}
689021
private void modifyTable(String tableName, HTableDescriptor newDescriptor) {
    LOG.info("Modifying table " + tableName);
    HColumnDescriptor[] newFamilies = newDescriptor.getColumnFamilies();
    try {
      List<HColumnDescriptor> columnsToAdd = Lists.newArrayList();
      HTableDescriptor currentFamilies = hbaseAdmin
          .getTableDescriptor(Bytes.toBytes(tableName));
      for (HColumnDescriptor newFamily : newFamilies) {
        if (!currentFamilies.hasFamily(newFamily.getName())) {
          columnsToAdd.add(new HColumnDescriptor(newFamily.getName()));
        }
      }
      // Add all the necessary column families
      if (!columnsToAdd.isEmpty()) {
        hbaseAdmin.disableTable(tableName);
        try {
          for (HColumnDescriptor columnToAdd : columnsToAdd) {
            hbaseAdmin.addColumn(tableName, columnToAdd);
          }
        } finally {
          hbaseAdmin.enableTable(tableName);
        }
      }
    } catch (IOException e) {
      throw new DatasetException(e);
    }
  }
1102984
private void extractClassTableName() {
      final Table tableAnnotation = clazz.getAnnotation(Table.class);
      if (tableAnnotation != null) {
         final String tableName = tableAnnotation.name();
         this.tableName = tableName.isEmpty()
            ? clazz.getSimpleName() // as per documentation, empty name in Table "defaults to the entity name"
            : tableName;
      }
   }
35034
private HTableDescriptor getTableDescriptor(Class<?> clazz, EntityType<?> entityType, String tableName)
    {
        try
        {
            AbstractManagedType<?> ent = (AbstractManagedType<?>) entityType;
            HTableDescriptor tableDescriptor = null;
            String hTableName = HBaseUtils.getHTableName(databaseName, tableName);
            tableDescriptor = !admin.tableExists(TableName.valueOf(hTableName)) ? new HTableDescriptor(
                    TableName.valueOf(hTableName)) : admin.getTableDescriptor(TableName.valueOf(hTableName));
            addColumnFamilyAndSetProperties(tableDescriptor, tableName);

            // Add column families for @SecondaryTable
            List<String> secondaryTables = ((DefaultEntityAnnotationProcessor) ent.getEntityAnnotation())
                    .getSecondaryTablesName();
            for (String secTable : secondaryTables)
            {
                addColumnFamilyAndSetProperties(tableDescriptor, secTable);
            }

            // handle @JoinTable for @ManyToMany
            List<Relation> relations = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, clazz).getRelations();
            addJoinTable(relations);

            // @CollectionTable is not handled.
            return tableDescriptor;
        }
        catch (IOException ex)
        {
            logger.error("Either table isn't in enabled state or some network problem, Caused by: ", ex);
            throw new SchemaGenerationException(ex, "Hbase");
        }
    }
785954
public Optional<String> parseTableAlias(final SQLStatement sqlStatement, final boolean setTableToken, final String tableName) {
        if (lexerEngine.skipIfEqual(DefaultKeyword.AS)) {
            return parseWithAs(sqlStatement, setTableToken, tableName);
        }
        if (lexerEngine.equalAny(getDefaultAvailableKeywordsForTableAlias()) || lexerEngine.equalAny(getCustomizedAvailableKeywordsForTableAlias())) {
            return parseAlias(sqlStatement, setTableToken, tableName);
        }
        return Optional.absent();
    }
1306143
private void addAliasDefinition(AliasDefinition aliasDef) {
        // Prerequisites:
        assert aliasDef != null;
        assert !m_aliasDefMap.containsKey(aliasDef.getName());
        assert aliasDef.getTableName().equals(this.getTableName());
        
        m_aliasDefMap.put(aliasDef.getName(), aliasDef);
    }
599249
@Override
	public void registerTableSink(String name) {
		Preconditions.checkNotNull(name);
		TableSink<?> tableSink = TableFactoryUtil.findAndCreateTableSink(this);
		tableEnv.registerTableSink(name, tableSink);
	}
10186
public static <T> TableSource<T> findAndCreateTableSource(Descriptor descriptor) {
		Map<String, String> properties = descriptor.toProperties();

		TableSource tableSource;
		try {
			tableSource = TableFactoryService
				.find(TableSourceFactory.class, properties)
				.createTableSource(properties);
		} catch (Throwable t) {
			throw new TableException("findAndCreateTableSource failed.", t);
		}

		return tableSource;
	}
129597
private void ensureTableIfNecessary(ClassDescriptorDef classDef, String checkLevel)
    {
        if (classDef.getBooleanProperty(PropertyHelper.OJB_PROPERTY_OJB_PERSISTENT, false))
        {
            if (!classDef.hasProperty(PropertyHelper.OJB_PROPERTY_TABLE))
            {
                classDef.setProperty(PropertyHelper.OJB_PROPERTY_TABLE, classDef.getDefaultTableName());
            }
        }
    }
714184
public static TableFormat makeTableFormat(final TableDescription desc)
    {
        return new AdvancedWritableTableFormat()
        {
            public Class getColumnClass(int i)
            {
                return desc.getType(i);
            }

            public Comparator getColumnComparator(int i)
            {
                Comparator comp = desc.getColumnComparator(i);
                if (comp != null)
                    return comp;

                Class type = getColumnClass(i);
                if (Boolean.class.isAssignableFrom(type) || Boolean.TYPE.isAssignableFrom(type))
                    return GlazedLists.booleanComparator();
                else if (String.class.isAssignableFrom(type))
                    return getLowerCaseStringComparator();
                else if(Comparable.class.isAssignableFrom(type))
                    return GlazedLists.comparableComparator();
                else
                    return null;
            }

            public int getColumnCount()
            {
                return desc.getColumnCount();
            }

            public String getColumnName(int i)
            {
                return desc.getHeader(i);
            }

            public Object getColumnValue(Object obj, int i)
            {
                return desc.getValue(obj, i);
            }

            public boolean isEditable(Object baseObject, int column)
            {
                return desc.getColumnEditor(column) != null;
            }

            public Object setColumnValue(Object baseObject, Object editedValue, int column)
            {
                desc.setValue(baseObject, column, editedValue);
                return baseObject;
            }
        };
    }
1009223
public void setClassNameResolver(final Object classNameResolver) {
        if (classNameResolver instanceof ClassNameResolver) {
            this.classNameResolver = (ClassNameResolver) classNameResolver;
        } else if (classNameResolver instanceof String) {
            this.classNameResolver = new ClassNameResolver() {
                public String resolveClassname(String classname) {
                    return makeClassName((String) classNameResolver, classname);
                }
            };
        } else if (classNameResolver instanceof Closure) {
            final ObjectGraphBuilder self = this;
            this.classNameResolver = new ClassNameResolver() {
                public String resolveClassname(String classname) {
                    Closure cls = (Closure) classNameResolver;
                    cls.setDelegate(self);
                    return (String) cls.call(new Object[]{classname});
                }
            };
        } else if (classNameResolver instanceof Map) {
            Map classNameResolverOptions = (Map) classNameResolver;

            String resolverName = (String) classNameResolverOptions.get(CLASSNAME_RESOLVER_KEY);

            if (resolverName == null) {
                throw new RuntimeException("key '" + CLASSNAME_RESOLVER_KEY + "' not defined");
            }

            if (CLASSNAME_RESOLVER_REFLECTION.equals(resolverName)) {
                String root = (String) classNameResolverOptions.get(CLASSNAME_RESOLVER_REFLECTION_ROOT);

                if (root == null) {
                    throw new RuntimeException("key '" + CLASSNAME_RESOLVER_REFLECTION_ROOT + "' not defined");
                }

                this.classNameResolver = new ReflectionClassNameResolver(root);
            } else {
                throw new RuntimeException("unknown class name resolver " + resolverName);
            }
        } else {
            this.classNameResolver = new DefaultClassNameResolver();
        }
    }
348135
public function setTableDefinition()
    {
        $this->setTableName('gallery_groups');
        $this->hasColumns(array(
            'id' => array(
                'type' => 'integer',
                'unsigned' => true,
                'autoincrement' => true,
            ),
            'section' => array(
                'type' => 'integer',
                'unsigned' => true,
                'default' => null,
            ),
            'title' => array(
                'type' => 'string',
                'length' => 255,
                'default' => null,
            ),
            'description' => array(
                'type' => 'string',
                'length' => 65535,
                'default' => null,
            ),
            'position' => array(
                'type' => 'integer',
                'unsigned' => true,
                'default' => 0,
            ),
        ));
        $this->index('list_idx', array('fields' => array('section', 'position')));
    }
747710
private ClassDescriptor[] getMultiJoinedClassDescriptors(ClassDescriptor cld)
    {
        DescriptorRepository repository = cld.getRepository();
        Class[] multiJoinedClasses = repository.getSubClassesMultipleJoinedTables(cld, true);
        ClassDescriptor[] result = new ClassDescriptor[multiJoinedClasses.length];

        for (int i = 0 ; i < multiJoinedClasses.length; i++)
        {
            result[i] = repository.getDescriptorFor(multiJoinedClasses[i]);
         }

        return result;
    }
418066
protected void handleShowTableName(EntityDesc entityDesc, TableMeta tableMeta) {
    if (showTableName || isNameDifferentBetweenEntityAndTable(entityDesc)) {
      entityDesc.setShowTableName(true);
    }
  }
355728
public void setTableTypes(String tableTypes) {
    if (tableTypes != null && tableTypes.length() > 0) {
      StringTokenizer tokenizer = new StringTokenizer(tableTypes, ",", false);
      this.tableTypes = new ArrayList<String>();
      while (tokenizer.hasMoreTokens()) {
        String tableType = tokenizer.nextToken();
        this.tableTypes.add(tableType.trim().toUpperCase());
      }
    }
  }