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);