Package play.modules.morphia.MorphiaPlugin

Examples of play.modules.morphia.MorphiaPlugin.IdType


public class IdGenerator {
    public static Datastore ds() {
        return MorphiaPlugin.ds();
    }
    public static Object generateId(Model entity){
        IdType t = MorphiaPlugin.getIdType();
        switch (t) {
        case Long:
            return generateLongId(entity);
        case ObjectId:
            return generateObjectIdId(entity);
View Full Code Here


    public static <T extends Model> ObjectId generateObjectIdId(Class<T> clazz) {
        return new ObjectId();
    }
   
    public static String getIdTypeName() {
        IdType t = MorphiaPlugin.getIdType();
        switch (t) {
        case Long:
            return Long.class.getName();
        case ObjectId:
            return ObjectId.class.getName();
View Full Code Here

            throw new IllegalStateException("How can i get here???");
        }
    }
   
    public static Object processId(Object id) {
        IdType t = MorphiaPlugin.getIdType();
        switch (t) {
        case Long:
            return processLongId(id);
        case ObjectId:
            return processObjectId(id);
View Full Code Here

TOP

Related Classes of play.modules.morphia.MorphiaPlugin.IdType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.