public class XDB extends Object
Constructor and Description |
---|
XDB() |
Modifier and Type | Method and Description |
---|---|
static Database |
as(String username) |
static void |
clear() |
static <E> DbColumn<E> |
column(Map<String,Object> map,
String name,
Class<E> type) |
static Database |
db() |
static void |
delete(long id) |
static void |
delete(Object record) |
static void |
destroy() |
static <E> DbDsl<E> |
dsl(Class<E> entityType) |
static <E> void |
each(org.rapidoid.lambda.Operation<E> lambda) |
static <E> E |
entity(Class<E> entityType) |
static <E> E |
entity(Class<E> entityType,
Map<String,?> properties) |
static <E> E |
entity(Class<E> entityType,
String prop,
Object value) |
static <E> E |
entity(Class<E> entityType,
String prop1,
Object value1,
String prop2,
Object value2) |
static <E> E |
entity(Class<E> entityType,
String prop1,
Object value1,
String prop2,
Object value2,
String prop3,
Object value3) |
static <E> E |
entity(Class<E> entityType,
String prop1,
Object value1,
String prop2,
Object value2,
String prop3,
Object value3,
String prop4,
Object value4) |
static <E> E |
entity(Class<E> entityType,
String prop1,
Object value1,
String prop2,
Object value2,
String prop3,
Object value3,
String prop4,
Object value4,
String prop5,
Object value5) |
static <E> E |
entity(String rql,
Object... args) |
static <E> List<E> |
find(Class<E> clazz,
org.rapidoid.lambda.Predicate<E> match,
Comparator<E> orderBy) |
static <E> List<E> |
find(Class<E> clazz,
String query,
Object... args) |
static <E> List<E> |
find(Iterable<Long> ids) |
static <E> List<E> |
find(org.rapidoid.lambda.Predicate<E> match) |
static <E> List<E> |
find(String searchPhrase) |
static <T> T |
get(long id) |
static <T> T |
get(long id,
Class<T> clazz) |
static <E> List<E> |
getAll(Class<E> clazz) |
static <E> List<E> |
getAll(Collection<Long> ids) |
static <E> List<E> |
getAll(long... ids) |
static long |
getIdOf(Object record) |
static <T> T |
getIfExists(long id) |
static long |
getVersionOf(long id) |
static void |
halt() |
static void |
init(String data,
Object... args) |
static long |
insert(Object record) |
static boolean |
isActive() |
static <E> DbList<E> |
list(Object holder,
String relation) |
static String |
path() |
static long |
persist(Object record) |
static long |
persistedIdOf(Object record) |
static <E> E |
readColumn(long id,
String column) |
static <E> DbRef<E> |
ref(Object holder,
String relation) |
static <E> void |
refresh(E record) |
static <RESULT> RESULT |
rql(String rql,
Object... args) |
static DbSchema |
schema() |
static <E> DbSet<E> |
set(Object holder,
String relation) |
static void |
setDb(Database db) |
static void |
shutdown() |
static long |
size() |
static void |
start() |
static Database |
sudo() |
static void |
transaction(Runnable transaction,
boolean readOnly) |
static void |
transaction(Runnable transaction,
boolean readOnly,
org.rapidoid.concurrent.Callback<Void> callback) |
static void |
update(long id,
Object record) |
static void |
update(Object record) |
public static String path()
public static void start()
public static Database db()
public static void setDb(Database db)
public static long insert(Object record)
public static void delete(long id)
public static void delete(Object record)
public static <T> T get(long id)
public static <T> T getIfExists(long id)
public static <T> T get(long id, Class<T> clazz)
public static <E> List<E> getAll(long... ids)
public static <E> List<E> getAll(Collection<Long> ids)
public static <E> void refresh(E record)
public static void update(long id, Object record)
public static void update(Object record)
public static long persist(Object record)
public static long persistedIdOf(Object record)
public static <E> E readColumn(long id, String column)
public static <E> List<E> find(org.rapidoid.lambda.Predicate<E> match)
public static <E> List<E> find(Class<E> clazz, org.rapidoid.lambda.Predicate<E> match, Comparator<E> orderBy)
public static <E> void each(org.rapidoid.lambda.Operation<E> lambda)
public static void transaction(Runnable transaction, boolean readOnly)
public static void transaction(Runnable transaction, boolean readOnly, org.rapidoid.concurrent.Callback<Void> callback)
public static void shutdown()
public static long size()
public static void clear()
public static boolean isActive()
public static void halt()
public static void destroy()
public static long getIdOf(Object record)
public static long getVersionOf(long id)
public static DbSchema schema()
public static <E> E entity(Class<E> entityType)
public static <E> E entity(Class<E> entityType, String prop1, Object value1, String prop2, Object value2)
public static <E> E entity(Class<E> entityType, String prop1, Object value1, String prop2, Object value2, String prop3, Object value3)
public static <E> E entity(Class<E> entityType, String prop1, Object value1, String prop2, Object value2, String prop3, Object value3, String prop4, Object value4)
public static <E> E entity(Class<E> entityType, String prop1, Object value1, String prop2, Object value2, String prop3, Object value3, String prop4, Object value4, String prop5, Object value5)
public static Database sudo()
Copyright © 2014–2015 Nikolche Mihajlovski and contributors. All rights reserved.