public final class ModelDelegate extends Object
Modifier and Type | Method and Description |
---|---|
static List<Association> |
associations(Class<? extends Model> clazz) |
static Set<String> |
attributeNames(Class<? extends Model> clazz) |
static List<String> |
attributes(Class<? extends Model> clazz)
Deprecated.
use
attributeNames(Class) instead |
static boolean |
belongsTo(Class<? extends Model> clazz,
Class<? extends Model> targetClass) |
static void |
blankToNull(Class<? extends Model> clazz,
String... attributeNames) |
static void |
callbackWith(Class<? extends Model> clazz,
CallbackListener... listeners) |
static ValidationBuilder |
convertDate(Class<? extends Model> clazz,
String attributeName,
String format)
Deprecated.
use {@link #dateFormat(Class, String, String...) instead
|
static ValidationBuilder |
convertTimestamp(Class<? extends Model> clazz,
String attributeName,
String format)
Deprecated.
use {@link #timestampFormat(Class, String, String...) instead
|
protected static ValidationBuilder |
convertWith(Class<? extends Model> clazz,
Converter converter)
Deprecated.
|
static void |
convertWith(Class<? extends Model> clazz,
Converter converter,
String... attributeNames) |
static Long |
count(Class<? extends Model> clazz) |
static Long |
count(Class<? extends Model> clazz,
String query,
Object... params) |
static <T extends Model> |
create(Class<T> clazz,
Object... namesAndValues) |
static <T extends Model> |
createIt(Class<T> clazz,
Object... namesAndValues) |
static void |
dateFormat(Class<? extends Model> clazz,
DateFormat format,
String... attributeNames) |
static void |
dateFormat(Class<? extends Model> clazz,
String pattern,
String... attributeNames) |
static int |
delete(Class<? extends Model> clazz,
String query,
Object... params) |
static int |
deleteAll(Class<? extends Model> clazz) |
static boolean |
exists(Class<? extends Model> clazz,
Object id) |
static <T extends Model> |
findAll(Class<T> clazz) |
static <T extends Model> |
findByCompositeKeys(Class<T> clazz,
Object... values) |
static <T extends Model> |
findById(Class<T> clazz,
Object id) |
static <T extends Model> |
findBySql(Class<T> clazz,
String fullQuery,
Object... params) |
static <T extends Model> |
findFirst(Class<T> clazz,
String subQuery,
Object... params) |
static <T extends Model,M extends T> |
findWith(Class<M> clazz,
ModelListener<T> listener,
String query,
Object... params) |
static MetaModel |
metaModelOf(Class<? extends Model> clazz) |
static void |
purgeCache(Class<? extends Model> clazz) |
static void |
removeValidator(Class<? extends Model> clazz,
Validator validator) |
static String |
tableNameOf(Class<? extends Model> clazz) |
static void |
timestampFormat(Class<? extends Model> clazz,
DateFormat format,
String... attributeNames) |
static void |
timestampFormat(Class<? extends Model> clazz,
String pattern,
String... attributeNames) |
static int |
update(Class<? extends Model> clazz,
String updates,
String conditions,
Object... params) |
static int |
updateAll(Class<? extends Model> clazz,
String updates,
Object... params) |
static ValidationBuilder |
validateEmailOf(Class<? extends Model> clazz,
String attributeName) |
static NumericValidationBuilder |
validateNumericalityOf(Class<? extends Model> clazz,
String... attributeNames) |
static ValidationBuilder |
validatePresenceOf(Class<? extends Model> clazz,
String... attributeNames) |
static ValidationBuilder |
validateRange(Class<? extends Model> clazz,
String attributeName,
Number min,
Number max) |
static ValidationBuilder |
validateRegexpOf(Class<? extends Model> clazz,
String attributeName,
String pattern) |
static ValidationBuilder |
validateWith(Class<? extends Model> clazz,
Validator validator) |
static List<Validator> |
validatorsOf(Class<? extends Model> clazz) |
static <T extends Model> |
where(Class<T> clazz,
String subquery,
Object... params) |
static void |
zeroToNull(Class<? extends Model> clazz,
String... attributeNames) |
public static List<Association> associations(Class<? extends Model> clazz)
@Deprecated public static List<String> attributes(Class<? extends Model> clazz)
attributeNames(Class)
insteadpublic static boolean belongsTo(Class<? extends Model> clazz, Class<? extends Model> targetClass)
public static void callbackWith(Class<? extends Model> clazz, CallbackListener... listeners)
@Deprecated public static ValidationBuilder convertDate(Class<? extends Model> clazz, String attributeName, String format)
@Deprecated public static ValidationBuilder convertTimestamp(Class<? extends Model> clazz, String attributeName, String format)
@Deprecated protected static ValidationBuilder convertWith(Class<? extends Model> clazz, Converter converter)
convertWith(Class, org.javalite.activejdbc.conversion.Converter, String...)
insteadpublic static void convertWith(Class<? extends Model> clazz, Converter converter, String... attributeNames)
public static void dateFormat(Class<? extends Model> clazz, DateFormat format, String... attributeNames)
public static void dateFormat(Class<? extends Model> clazz, String pattern, String... attributeNames)
public static <T extends Model> T findByCompositeKeys(Class<T> clazz, Object... values)
public static <T extends Model> LazyList<T> findBySql(Class<T> clazz, String fullQuery, Object... params)
public static <T extends Model> T findFirst(Class<T> clazz, String subQuery, Object... params)
public static <T extends Model,M extends T> void findWith(Class<M> clazz, ModelListener<T> listener, String query, Object... params)
public static void removeValidator(Class<? extends Model> clazz, Validator validator)
public static void timestampFormat(Class<? extends Model> clazz, String pattern, String... attributeNames)
public static void timestampFormat(Class<? extends Model> clazz, DateFormat format, String... attributeNames)
public static int update(Class<? extends Model> clazz, String updates, String conditions, Object... params)
public static int updateAll(Class<? extends Model> clazz, String updates, Object... params)
public static ValidationBuilder validateEmailOf(Class<? extends Model> clazz, String attributeName)
public static NumericValidationBuilder validateNumericalityOf(Class<? extends Model> clazz, String... attributeNames)
public static ValidationBuilder validatePresenceOf(Class<? extends Model> clazz, String... attributeNames)
public static ValidationBuilder validateRange(Class<? extends Model> clazz, String attributeName, Number min, Number max)
public static ValidationBuilder validateRegexpOf(Class<? extends Model> clazz, String attributeName, String pattern)
public static ValidationBuilder validateWith(Class<? extends Model> clazz, Validator validator)
public static <T extends Model> LazyList<T> where(Class<T> clazz, String subquery, Object... params)
Copyright © 2016 JavaLite. All rights reserved.