/** * Returns all the registered {@link DbPlatform} objects. */ public static Iterable<DbPlatform> all(){ return currentPlatforms().values(); }
/** * Returns the {@link DbPlatform} matched the given db type name. * * <p> * Returns <code>null</code> if the given db type name not found. * * <p> * The type name is case sensitive. */ public static DbPlatform tryGet(String name) throws ObjectNotFoundException { if(null == name){ return null; } return currentPlatforms().get(name.toLowerCase()); }
private static Map<String,DbPlatform> currentPlatforms(){ return currentPlatforms(AppContext.current()); }