All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.loom.simpleds.functions.KeyToBase58IdFunction Maven / Gradle / Ivy

The newest version!
package org.loom.simpleds.functions;

import org.loom.util.StringUtils;

import com.google.appengine.api.datastore.Key;
import com.google.common.base.Function;

/**
 * Transform a Key to the Base58 representation of its id value
 * @see Base58IdToKeyFunction
 * @author icoloma
 */
public class KeyToBase58IdFunction implements Function {

	@Override
	public String apply(Key key) {
		return key == null? null : StringUtils.numberToAlpha(key.getId());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy