Returns the name of the database server.

@return the name of the database server
352912
public String getServerName() {
    if (hostname != null) {
      return hostname;
    }
    boolean hasHost = urlParser != null && this.urlParser.getHostAddresses().get(0).host != null;
    return (hasHost) ? this.urlParser.getHostAddresses().get(0).host : "localhost";
  }
718148
private String getDbTableName(String schemaName) {
    Preconditions.checkArgument(schemaName.matches(".+_.+_.+"));
    return schemaName.replaceFirst("_", ".").substring(0, schemaName.lastIndexOf('_'));
  }
548668
public static String getHostname() {
		final String hostname = System.getProperty(HOSTNAME_PROPERTY);
		// TODO : Ensure hostname format is valid.
		return (hostname == null ? DEFAULT_HOSTNAME : hostname);
	}
392190
public String getDatabaseName(String databaseKey) {

        return getDatabaseProperties().get(databaseKey).getProperty(databaseKey + PROPKEY_NAME);
    }
950123
private String getDatabaseInfoDatabaseName(String className)
    {
        String databaseName = className.substring(0, className.length() - 1 - DatabaseInfo.DATABASE_INFO_FILE.length());
        databaseName = databaseName.substring(databaseName.lastIndexOf('.') + 1);
        if (databaseName.endsWith(BaseDatabase.SHARED_SUFFIX))
            databaseName = databaseName.substring(0, databaseName.length() - BaseDatabase.SHARED_SUFFIX.length());
        if (databaseName.endsWith(BaseDatabase.USER_SUFFIX))
            databaseName = databaseName.substring(0, databaseName.length() - BaseDatabase.USER_SUFFIX.length());
        return databaseName;
    }
1336680
public String getName() {
        String name = super.getName();
        if (name != null) {
            if (name.equals(getParameterDescriptor().getDisplayName()) ||
                name.length() == 0) {
                name = null;
            }
        }
        
        return name;
    }
644898
public DatabaseInfo getDatabaseInfo(Connection connection) throws SQLException
    {
        PreparedStatement statement = connection.prepareStatement("select @@servername, db_name()");
        ResultSet results = null;
        DatabaseInfo info = null;

        try
        {
            results = statement.executeQuery();

            if (!results.next())
            {
                throw new SQLException("Query for database name and server name returned zero rows!");
            }

            info = new DatabaseInfo(results.getString(1), results.getString(2));
        }
        finally
        {
            closeResultSet(results, "Ignoring error whilst closing ResultSet that was used to query the DatabaseInfo");

            closeStatement(statement, "Ignoring error whilst closing PreparedStatement that was used to query the DatabaseInfo");
        }

        return info;
    }
181732
String getDatabaseName(String dbName) {
        if (mFileNameMap == null) {
            return null;
        }
        String name = mFileNameMap.get(dbName);
        if (name == null && dbName != null) {
            name = mFileNameMap.get(null);
        }
        if (name == null) {
            return null;
        }
        if (mDatabaseHook != null) {
            try {
                dbName = mDatabaseHook.databaseName(dbName);
            } catch (IncompatibleClassChangeError e) {
                // Method not implemented.
            }
        }
        return dbName;
    }
729487
protected function ServerHostname() {
    if (!empty($this->Hostname)) {
      $result = $this->Hostname;
    } elseif (isset($_SERVER['SERVER_NAME'])) {
      $result = $_SERVER['SERVER_NAME'];
    } else {
      $result = 'localhost.localdomain';
    }

    return $result;
  }
841432
public function getTableName()
    {
        if ($this->_tableName === null) {
            $this->_tableName = $this->model->tableName();
        }
        
        return $this->_tableName;
    }
554357
protected String getTableName() {
        Class<T> entityClass = this.getEntityClass();
        if (!entityClass.isAnnotationPresent(DynamoDBTable.class)) {
            throw new IllegalStateException("Used getTableName on entity without @DynamoDBTable annotation");
        }
        return entityClass.getAnnotation(DynamoDBTable.class).tableName();
    }
142128
private String getHostName() {
        String hostName = AccessController.doPrivileged(new PrivilegedAction<String>() {
            @Override
            public String run() {
                try {
                    return java.net.InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
                } catch (java.net.UnknownHostException e) {
                    return "localhost";
                }
            }
        });
        return hostName;
    }
731896
@Override
    public String[] getCacheInstanceNames() {
        Map instances = ServerCache.getCacheInstances();
        String names[] = new String[instances.size()];
        Iterator it = instances.keySet().iterator();
        int i = 0;
        while (it.hasNext()) {
            names[i] = (String) it.next();
            i++;
        }
        return names;
    }
666733
protected String getTableName(PersistentEntity domainClass, String sessionFactoryBeanName) {
        Mapping m = getMapping(domainClass);
        String tableName = null;
        if (m != null && m.getTableName() != null) {
            tableName = m.getTableName();
        }
        if (tableName == null) {
            String shortName = domainClass.getJavaClass().getSimpleName();
            PersistentEntityNamingStrategy namingStrategy = this.namingStrategy;

            if(namingStrategy != null) {
                tableName = namingStrategy.resolveTableName(domainClass);
            }
            if(tableName == null) {
                tableName = getNamingStrategy(sessionFactoryBeanName).classToTableName(shortName);
            }
        }
        return tableName;
    }
1326308
@Override
	public String getName()
    {
    	return (usingSSL ? PacketTransportType.TCPS : PacketTransportType.TCP)+"-"+listenAddr+"-"+listenPort;
    }
1105387
public String name() {
    return Charset.isSupported(encoding) ? Charset.forName(encoding).name() : encoding;
  }
1095793
public String getSqlFilename(){
        return isSqlFileNamePropertySet() ? properties.getProperty(SQL_FILE_NAME) + ".sql" :
                new SimpleDateFormat("d_M_Y_H_mm_ss").format(new Date()) + "_" + database + "_database_dump.sql";
    }