play.modules.morphia
Class MorphiaPlugin

java.lang.Object
  extended by play.PlayPlugin
      extended by play.modules.morphia.MorphiaPlugin
All Implemented Interfaces:
Comparable<PlayPlugin>

public class MorphiaPlugin
extends PlayPlugin

The plugin for the Morphia module.

Author:
greenlaw110@gmail.com

Nested Class Summary
static class MorphiaPlugin.IdType
           
static class MorphiaPlugin.MorphiaModelLoader
           
 
Field Summary
static String PREFIX
           
static String VERSION
           
 
Fields inherited from class play.PlayPlugin
index
 
Constructor Summary
MorphiaPlugin()
           
 
Method Summary
 Object bind(String name, Class clazz, Type type, Annotation[] annotations, Map<String,String[]> params)
           
 Object bind(String name, Object o, Map<String,String[]> params)
           
static void clearAllModelEventHandler()
           
static void clearGlobalEventHandler()
           
static void clearModelEventHandler(Class<? extends Model> model)
           
static boolean configured()
           
static void debug(String msg, Object... args)
           
static void debug(Throwable t, String msg, Object... args)
           
static Datastore ds()
           
static Datastore ds(String dbName)
           
 void enhance(ApplicationClasses.ApplicationClass applicationClass)
           
static void error(String msg, Object... args)
           
static void error(Throwable t, String msg, Object... args)
           
static void fatal(String msg, Object... args)
           
static void fatal(Throwable t, String msg, Object... args)
           
static MorphiaPlugin.IdType getIdType()
           
static GridFS gridFs()
           
static void info(String msg, Object... args)
           
static void info(Throwable t, String msg, Object... args)
           
static boolean loggerRegistered()
           
 Model.Factory modelFactory(Class<? extends Model> modelClass)
           
static Morphia morphia()
           
 void onApplicationStart()
           
 void onConfigurationRead()
           
 void onInvocationException(Throwable e)
           
static void registerGlobalEventHandler(MorphiaEvent.IMorphiaEventHandler handler)
           
static void registerModelEventHandler(Class<? extends Model> model, MorphiaEvent.IMorphiaEventHandler handler)
           
static void trace(String msg, Object... args)
           
static void trace(Throwable t, String msg, Object... args)
           
static void unregisterGlobalEventHandler(MorphiaEvent.IMorphiaEventHandler handler)
           
static void unregisterModelEventHandler(Class<? extends Model> model, MorphiaEvent.IMorphiaEventHandler handler)
           
static void warn(String msg, Object... args)
           
static void warn(Throwable t, String msg, Object... args)
           
 
Methods inherited from class play.PlayPlugin
addTemplateExtensions, afterActionInvocation, afterApplicationStart, afterFixtureLoad, afterInvocation, beforeActionInvocation, beforeDetectingChanges, beforeInvocation, compareTo, compileAll, detectChange, getJsonStatus, getMessage, getStatus, invocationFinally, loadTemplate, onActionInvocationResult, onApplicationReady, onApplicationStop, onClassesChange, onEvent, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, rawInvocation, routeRequest, runTest, serveStatic, unBind, willBeValidated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
See Also:
Constant Field Values

PREFIX

public static final String PREFIX
See Also:
Constant Field Values
Constructor Detail

MorphiaPlugin

public MorphiaPlugin()
Method Detail

info

public static void info(String msg,
                        Object... args)

info

public static void info(Throwable t,
                        String msg,
                        Object... args)

debug

public static void debug(String msg,
                         Object... args)

debug

public static void debug(Throwable t,
                         String msg,
                         Object... args)

trace

public static void trace(String msg,
                         Object... args)

trace

public static void trace(Throwable t,
                         String msg,
                         Object... args)

warn

public static void warn(String msg,
                        Object... args)

warn

public static void warn(Throwable t,
                        String msg,
                        Object... args)

error

public static void error(String msg,
                         Object... args)

error

public static void error(Throwable t,
                         String msg,
                         Object... args)

fatal

public static void fatal(String msg,
                         Object... args)

fatal

public static void fatal(Throwable t,
                         String msg,
                         Object... args)

loggerRegistered

public static boolean loggerRegistered()

configured

public static boolean configured()

getIdType

public static MorphiaPlugin.IdType getIdType()

ds

public static Datastore ds()

gridFs

public static GridFS gridFs()

ds

public static Datastore ds(String dbName)

morphia

public static Morphia morphia()

enhance

public void enhance(ApplicationClasses.ApplicationClass applicationClass)
             throws Exception
Overrides:
enhance in class PlayPlugin
Throws:
Exception

registerGlobalEventHandler

public static void registerGlobalEventHandler(MorphiaEvent.IMorphiaEventHandler handler)

unregisterGlobalEventHandler

public static void unregisterGlobalEventHandler(MorphiaEvent.IMorphiaEventHandler handler)

clearGlobalEventHandler

public static void clearGlobalEventHandler()

registerModelEventHandler

public static void registerModelEventHandler(Class<? extends Model> model,
                                             MorphiaEvent.IMorphiaEventHandler handler)

unregisterModelEventHandler

public static void unregisterModelEventHandler(Class<? extends Model> model,
                                               MorphiaEvent.IMorphiaEventHandler handler)

clearModelEventHandler

public static void clearModelEventHandler(Class<? extends Model> model)

clearAllModelEventHandler

public static void clearAllModelEventHandler()

onConfigurationRead

public void onConfigurationRead()
Overrides:
onConfigurationRead in class PlayPlugin

onApplicationStart

public void onApplicationStart()
Overrides:
onApplicationStart in class PlayPlugin

onInvocationException

public void onInvocationException(Throwable e)
Overrides:
onInvocationException in class PlayPlugin

bind

public Object bind(String name,
                   Class clazz,
                   Type type,
                   Annotation[] annotations,
                   Map<String,String[]> params)
Overrides:
bind in class PlayPlugin

bind

public Object bind(String name,
                   Object o,
                   Map<String,String[]> params)
Overrides:
bind in class PlayPlugin

modelFactory

public Model.Factory modelFactory(Class<? extends Model> modelClass)
Overrides:
modelFactory in class PlayPlugin


Copyright © 2012. All Rights Reserved.