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<I> idType,
Class<T> type)
Deprecated.
|
Finder(Class<T> type)
Create with the type of the entity bean.
|
Finder(String serverName,
Class<I> idType,
Class<T> type)
Deprecated.
|
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, findEach, findEachWhile, findFutureRowCount, findIds, findList, findMap, findMap, findPagedList, findRowCount, findSet, getExpressionFactory, nextId, on, order, order, orderBy, orderBy, query, ref, select, setAutoTune, setFirstRow, setForUpdate, setId, setLoadBeanCache, setMaxRows, setQuery, 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>(){};
...
public Finder(String serverName, Class<T> type)
public Finder(Class<I> idType, Class<T> type)
Model.Find or constructor Finder(Class) that
does not have the idType parameter.
Create with the type of the ID property and entity bean and specific server name.Copyright © 2015. All rights reserved.