I - type of the Id propertyT - type of the entity beanpublic static class Model.Finder<I,T> extends Model.Find<I,T>
It should be preferred to use Model.Find instead of Finder as that can use reflection to determine the class
literal type of the entity bean.
| Constructor and Description |
|---|
Finder(Class<T> type)
Create with the type of the entity bean.
|
Finder(String serverName,
Class<T> type)
Create with the type of the entity bean and specific server name.
|
all, apply, byId, db, db, deleteById, fetch, fetch, fetch, fetch, filter, findCount, findEach, findEachWhile, findFutureCount, findFutureRowCount, findIds, findList, findMap, findMap, findRowCount, findSet, getExpressionFactory, nextId, on, order, order, orderBy, orderBy, query, ref, select, setAutoTune, setFirstRow, setForUpdate, setId, setLoadBeanCache, setMaxRows, setRawSql, setReadOnly, setUseCache, setUseQueryCache, wherepublic Finder(Class<T> type)
@Entity
public class Customer extends BaseModel {
public static final Finder<Long,Customer> find = new Finder<Long,Customer>(Customer.class);
...
Find as below. This approach is more DRY in that it does
not require the class literal Customer.class to be passed into the constructor.
@Entity
public class Customer extends BaseModel {
public static final Find<Long,Customer> find = new Find<Long,Customer>(){};
...
Copyright © 2016. All rights reserved.