Modifier and Type | Method and Description |
---|---|
static void |
addScope(String className,
String scope,
String criteria) |
static List<Association> |
associations(Class<? extends Model> clazz) |
static Set<String> |
attributeNames(Class<? extends Model> clazz) |
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 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> |
findOrCreateIt(Class<T> clazz,
boolean save,
Object... namesAndValues) |
static <T extends Model> |
findOrCreateIt(Class<T> clazz,
Object... namesAndValues) |
static <T extends Model> |
findOrInit(Class<T> clazz,
Object... namesAndValues) |
static <T extends Model,M extends T> |
findWith(Class<M> clazz,
ModelListener<T> listener,
String query,
Object... params) |
static MetaModel |
metaModelFor(String tableName)
Returns
MetaModel associated with table name. |
static MetaModel |
metaModelOf(Class<? extends Model> clazz)
Returns
MetaModel associated with model class. |
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)
public static boolean belongsTo(Class<? extends Model> clazz, Class<? extends Model> targetClass)
public static void callbackWith(Class<? extends Model> clazz, CallbackListener... listeners)
public 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 MetaModel metaModelFor(String tableName)
MetaModel
associated with table name.tableName
- name of table.MetaModel
associated with table namepublic static MetaModel metaModelOf(Class<? extends Model> clazz)
MetaModel
associated with model class.clazz
- model class.MetaModel
associated with table namepublic 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)
public static <T extends Model> T findOrCreateIt(Class<T> clazz, Object... namesAndValues)
public static <T extends Model> T findOrCreateIt(Class<T> clazz, boolean save, Object... namesAndValues)
Copyright © 2020 JavaLite. All rights reserved.