Java 类com.datastax.driver.core.DataType.Name 实例源码

项目:hecuba    文件:DataStaxBasedHecubaClientManager.java   
private Object convertKey(K key) {
    if (keyType.getName() == Name.BIGINT) {
        return key;
    } else if (keyType.getName() == Name.TEXT) {
        return key.toString();
    } else {
        throw new RuntimeException("Unhandled DataType: " + keyType);
    }
}
项目:hecuba    文件:DataStaxBasedHecubaClientManager.java   
private List<?> convertKeys(Set<K> keys) {
    if (keyType.getName() == Name.BIGINT) {
        return new ArrayList<>(keys);
    } else if (keyType.getName() != Name.TEXT) {
        throw new RuntimeException("Unhandled DataType: " + keyType);
    }

    List<Object> convertedKeys = new ArrayList<>(keys.size());

    for (K key : keys) {
        convertedKeys.add(key.toString());
    }

    return convertedKeys;
}
项目:hecuba    文件:DataStaxBasedSharedHecubaClientManager.java   
private Object convertKey(K key) {
    if (keyType.getName() == Name.BIGINT) {
        return key;
    } else if (keyType.getName() == Name.TEXT) {
        return key.toString();
    } else {
        throw new RuntimeException("Unhandled DataType: " + keyType);
    }
}
项目:hecuba    文件:DataStaxBasedSharedHecubaClientManager.java   
private List<?> convertKeys(Set<K> keys) {
    if (keyType.getName() == Name.BIGINT) {
        return new ArrayList<>(keys);
    } else if (keyType.getName() != Name.TEXT) {
        throw new RuntimeException("Unhandled DataType: " + keyType);
    }

    List<Object> convertedKeys = new ArrayList<>(keys.size());

    for (K key : keys) {
        convertedKeys.add(key.toString());
    }

    return convertedKeys;
}