![JAR search and dependency download from the Maven repository](/logo.png)
org.loom.simpleds.functions.Base58IdToKeyFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of loom-appengine Show documentation
Show all versions of loom-appengine Show documentation
Uploads all artifacts belonging to configuration ':archives'.
The newest version!
package org.loom.simpleds.functions;
import org.loom.util.StringUtils;
import org.simpleds.functions.AbstractPartialKeyFunction;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
/**
* Transform a Base58 representation of the id to the corresponding Key value
* @see KeyToBase58IdFunction
* @author icoloma
*/
public class Base58IdToKeyFunction extends AbstractPartialKeyFunction {
public Base58IdToKeyFunction(Class> persistentClass) {
super(persistentClass);
}
@Override
public Key apply(String key) {
return key == null? null : KeyFactory.createKey(kind, StringUtils.alphaToNumber(key));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy