Constructor and Description |
---|
ORMUtil() |
Modifier and Type | Method and Description |
---|---|
static Struct |
convertToSimpleMap(String paramsStr) |
static boolean |
equals(Object left,
Object right) |
static DataSource |
getDataSource(PageContext pc,
Component cfc)
if the given component has defined a datasource in the meta data, lucee is returning this datasource,
otherwise the default orm datasource is returned
|
static DataSource |
getDataSource(PageContext pc,
Component cfc,
DataSource defaultValue)
if the given component has defined a datasource in the meta data, lucee is returning this datasource,
otherwise the default orm datasource is returned
|
static DataSource |
getDataSource(PageContext pc,
String dsn) |
static DataSource |
getDataSource(PageContext pc,
String dsn,
DataSource defaultValue) |
static String |
getDataSourceName(PageContext pc,
Component cfc) |
static DataSource |
getDefaultDataSource(PageContext pc) |
static DataSource |
getDefaultDataSource(PageContext pc,
DataSource defaultValue) |
static ORMEngine |
getEngine(PageContext pc) |
static Property[] |
getIds(Property[] props) |
static Object |
getPropertyValue(Component cfc,
String name,
Object defaultValue) |
static ORMSession |
getSession(PageContext pc) |
static ORMSession |
getSession(PageContext pc,
boolean create) |
static boolean |
isRelated(Property prop) |
static void |
printError(String msg) |
static void |
printError(String msg,
ORMEngine engine) |
static void |
printError(Throwable t) |
static void |
printError(Throwable t,
ORMEngine engine) |
static void |
resetEngine(PageContext pc,
boolean force) |
public ORMUtil()
public static ORMSession getSession(PageContext pc) throws PageException
PageException
public static ORMSession getSession(PageContext pc, boolean create) throws PageException
PageException
public static ORMEngine getEngine(PageContext pc) throws PageException
PageException
public static void resetEngine(PageContext pc, boolean force) throws PageException
pc
- force
- if set to false the engine is on loaded when the configuration has changedPageException
public static void printError(Throwable t, ORMEngine engine)
public static void printError(String msg, ORMEngine engine)
public static void printError(Throwable t)
public static void printError(String msg)
public static Object getPropertyValue(Component cfc, String name, Object defaultValue)
public static Struct convertToSimpleMap(String paramsStr)
public static DataSource getDefaultDataSource(PageContext pc) throws PageException
PageException
public static DataSource getDefaultDataSource(PageContext pc, DataSource defaultValue)
public static DataSource getDataSource(PageContext pc, String dsn, DataSource defaultValue)
public static DataSource getDataSource(PageContext pc, String dsn) throws PageException
PageException
public static DataSource getDataSource(PageContext pc, Component cfc, DataSource defaultValue)
pc
- cfc
- PageException
public static DataSource getDataSource(PageContext pc, Component cfc) throws PageException
pc
- cfc
- PageException
public static String getDataSourceName(PageContext pc, Component cfc) throws PageException
PageException
Copyright © 2015 Lucee