Turns a SQL table by its name into a java class name (upper-case camel-case).
<p>
Example: WEB_USERS -&gt; WebUsers
@param table The database table
@return The java class name
503038
@Override
    public String getClassNameForTable(final Table table) {
        final StringBuilder classNameBuilder = new StringBuilder();
        final List<String> words = new ArrayList<>(Arrays.asList(table.getName()
                .toUpperCase()
                .replaceAll("(^[0-9]+|[^A-Z0-9_-])", "") // Delete every not-alphanumeric or _/- character and numbers at beginning
                .split("_")));
        words.removeAll(Arrays.asList("", null));
        for (String word : words) {
            classNameBuilder.append(word.substring(0, 1)); // First letter as uppercase
            classNameBuilder.append(word.substring(1).toLowerCase()); // Remaining string as lowercase
        }

        return classNameBuilder.toString();
    }
1038596
public Table getUserTable(Session session, String name, String schema) {

        Table t = findUserTable(session, name, schema);

        if (t == null) {
            throw Error.error(ErrorCode.X_42501, name);
        }

        return t;
    }
567543
def table_name(cls):
        
        if cls._prefix is None:
            raise AttributeError('Class prefix is not defined!')
        return cls._prefix + from_camel_case(cls.__name__)
634636
public static String getDynamicTableName(Class<?> entityClass, String tableName, String parameterName) {
        if (IDynamicTableName.class.isAssignableFrom(entityClass)) {
            if (StringUtil.isNotEmpty(parameterName)) {
                StringBuilder sql = new StringBuilder();
                sql.append("<choose>");
                sql.append("<when test=\"@tk.mybatis.mapper.util.OGNL@isDynamicParameter(" + parameterName + ") and " + parameterName + ".dynamicTableName != null and " + parameterName + ".dynamicTableName != ''\">");
                sql.append("${" + parameterName + ".dynamicTableName}");
                sql.append("</when>");
                //不支持指定列的时候查询全部列
                sql.append("<otherwise>");
                sql.append(tableName);
                sql.append("</otherwise>");
                sql.append("</choose>");
                return sql.toString();
            } else {
                return getDynamicTableName(entityClass, tableName);
            }

        } else {
            return tableName;
        }
    }
36504
public static String soyTemplateNameFromJavaClassName(String javaClass) {
    if (!javaClass.startsWith(CLASS_PREFIX)) {
      throw new IllegalArgumentException(
          "java class: " + javaClass + " is not a mangled soy template name");
    }
    return javaClass.substring(CLASS_PREFIX.length());
  }
158043
public String getTable(T bean) {
        if (tableStrategy == null) return table;
        String t = tableStrategy.getTable(table, bean);
        return t == null || t.isEmpty() ? table : t;
    }
79398
public AbstractThinTableModel getModel(JTable table)
    {
        AbstractThinTableModel model = null;
        if (table != null)
            model = (AbstractThinTableModel)table.getModel();
        return model;
    }
179976
private static <T> String getTableName(Class<T> clazz) {
		
		Table tableAnno = clazz.getAnnotation(Table.class);
		if(tableAnno != null){
			if(tableAnno.catalog() != null){
				return tableAnno.catalog() + "." + tableAnno.name();
			}
			return tableAnno.name();
		}
		//if Table annotation is null
		String className = clazz.getName();
		return IdUtils.toUnderscore(className.substring(className.lastIndexOf(".")+1));
	}
204134
public List<ExtendedRelation> getTableRelations(String table)
			throws SQLException {

		QueryBuilder<ExtendedRelation, Long> qb = queryBuilder();
		qb.where().like(ExtendedRelation.COLUMN_BASE_TABLE_NAME, table).or()
				.like(ExtendedRelation.COLUMN_RELATED_TABLE_NAME, table);
		PreparedQuery<ExtendedRelation> preparedQuery = qb.prepare();

		return query(preparedQuery);
	}
579954
public static String getDynamicTableName(Class<?> entityClass, String tableName) {
        if (IDynamicTableName.class.isAssignableFrom(entityClass)) {
            StringBuilder sql = new StringBuilder();
            sql.append("<choose>");
            sql.append("<when test=\"@tk.mybatis.mapper.util.OGNL@isDynamicParameter(_parameter) and dynamicTableName != null and dynamicTableName != ''\">");
            sql.append("${dynamicTableName}\n");
            sql.append("</when>");
            //不支持指定列的时候查询全部列
            sql.append("<otherwise>");
            sql.append(tableName);
            sql.append("</otherwise>");
            sql.append("</choose>");
            return sql.toString();
        } else {
            return tableName;
        }
    }
154208
public boolean tableExists(String table)
		throws SQLException
	{

		PreparedStatement statement = null;
		ResultSet result = null;
		try {
			statement = this.connection.prepareStatement("SHOW TABLES;");
			result = execute(statement);

			if (result == null) {
				return false;
			}
			boolean found = false;
			while(result.next()){
					if(table.equalsIgnoreCase(result.getString(1))){
						found = true;
					}
			}
			return found;

		}
		finally {
			if (statement != null) {
				statement.close();
			}
			if (result != null) {
				result.close();
			}
		}

	}
205699
public static Table getTable(final Class<?> entityType) {
		jp.co.future.uroborosql.mapping.annotations.Table table = entityType.getAnnotation(
				jp.co.future.uroborosql.mapping.annotations.Table.class);
		if (table != null) {
			return new TableImpl(table.name(), table.schema());
		}
		String baseName = entityType.getSimpleName();
		if (baseName.endsWith("Entity")) {
			baseName = baseName.substring(0, baseName.length() - 6);
		}
		return new TableImpl(CaseFormat.UPPER_SNAKE_CASE.convert(baseName), "");
	}
963049
public static String getColumns(final SQLiteTable table) {
		final Class<?> klass = table.getClass();

		final StringBuilder builder = new StringBuilder();
		final ConcatMap uniqueMap = new ConcatMap(",");

		try {
			getColumns(klass, builder, uniqueMap);
		} catch (final Exception e) {
			Logger.ex(e);
		}

		builder.append(getUnique(uniqueMap));

		if (builder.length() > 0) {
			builder.deleteCharAt(builder.length() - 1);
		}

		return "(" + builder.toString() + ")";
	}
462884
private Referenceable getTableReference(Table hiveTable)  throws Exception {
        LOG.debug("Getting reference for table {}.{}", hiveTable.getDbName(), hiveTable.getTableName());

        String typeName = HiveDataTypes.HIVE_TABLE.getName();
        String tblQualifiedName = getTableQualifiedName(getClusterName(), hiveTable.getDbName(), hiveTable.getTableName());
        return getEntityReference(typeName, tblQualifiedName);
    }
1086310
def parse_table_name(self, table):
        
        if "." in table:
            schema, table = table.split(".")
        else:
            schema = None
        return (schema, table)
785209
String getClassName(String name) {
        char[] s = new char[name.length()+1];
        char c;
        int j = 0;

        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
            s[j++] = '_';
        }
        for (int i=0; i < name.length(); i++, j++) {
            c = name.charAt(i);
            if ( Character.isJavaIdentifierPart(c) ) {
                s[j] = c;
            } else {
                s[j] = '_';
            }
        }
        return (new String(s)).trim();
     }
1248272
public Class<?> getJavaType(int sqlType, String typeName, int size, int digits, String tableName, String columnName) {
        // table.column mapped class
        Type<?> type = javaTypeMapping.getType(tableName, columnName);
        if (type != null) {
            return type.getReturnedClass();
        } else if (typeName != null && !typeName.isEmpty()) {
            typeName = typeName.toLowerCase();
            // typename mapped class
            Class<?> clazz = typeToName.get(typeName);
            if (clazz != null) {
                return clazz;
            }
            if (sqlType == Types.ARRAY) {
                if (typeName.startsWith("_")) {
                    typeName = typeName.substring(1);
                } else if (typeName.endsWith(" array")) {
                    typeName = typeName.substring(0, typeName.length() - 6);
                }
                if (typeName.contains("[")) {
                    typeName = typeName.substring(0, typeName.indexOf("["));
                }
                if (typeName.contains("(")) {
                    typeName = typeName.substring(0, typeName.indexOf("("));
                }

                Integer sqlComponentType = templates.getCodeForTypeName(typeName);
                if (sqlComponentType == null) {
                    logger.warn("Found no JDBC type for " + typeName + " using OTHER instead");
                    sqlComponentType = Types.OTHER;
                }
                Class<?> componentType = jdbcTypeMapping.get(sqlComponentType, size, digits);
                return Array.newInstance(componentType, 0).getClass();
            }
        }
        // sql type mapped class
        return jdbcTypeMapping.get(sqlType, size, digits);
    }