本文整理汇总了Java中javax.persistence.criteria.From.fetch方法的典型用法代码示例。如果您正苦于以下问题:Java From.fetch方法的具体用法?Java From.fetch怎么用?Java From.fetch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.persistence.criteria.From
的用法示例。
在下文中一共展示了From.fetch方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: copyJoins
import javax.persistence.criteria.From; //导入方法依赖的package包/类
private void copyJoins(From<?, ?> from, From<?, ?> to) {
for (Join<?, ?> join : from.getJoins()) {
Join<?, ?> toJoin = to.join(join.getAttribute().getName(), join.getJoinType());
toJoin.alias(getAlias(join));
copyJoins(join, toJoin);
}
for (Fetch<?, ?> fetch : from.getFetches()) {
Fetch<?, ?> toFetch = to.fetch(fetch.getAttribute().getName());
copyFetches(fetch, toFetch);
}
}
示例2: visit
import javax.persistence.criteria.From; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public boolean visit(JpqlOuterFetchJoin node, CriteriaHolder query) {
Path path = new Path(node.jjtGetChild(0).toString());
From<?, ?> from = query.getFrom(path.getRootAlias());
from.fetch(path.toString(), JoinType.LEFT);
return false;
}
示例3: copyFetches
import javax.persistence.criteria.From; //导入方法依赖的package包/类
/**
* Copy Fetches
* @param from source From
* @param to destination From
*/
public static void copyFetches(From<?, ?> from, From<?, ?> to) {
for (Fetch<?, ?> f : from.getFetches()) {
Fetch<?, ?> toFetch = to.fetch(f.getAttribute().getName());
copyFetches(f, toFetch);
}
}
示例4: fetchSingular
import javax.persistence.criteria.From; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private void fetchSingular(From path)
{
if (joinType == null)
{
path.fetch(singular);
}
else
{
path.fetch(singular, joinType);
}
}
示例5: fetchPlural
import javax.persistence.criteria.From; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
private void fetchPlural(From path)
{
if (joinType == null)
{
path.fetch(plural);
}
else
{
path.fetch(plural, joinType);
}
}