当前位置: 代码迷 >> Java Web开发 >> 步骤写法详解
  详细解决方案

步骤写法详解

热度:212   发布时间:2016-04-15 22:38:12.0
方法写法详解
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);
}
}
------解决思路----------------------
引用:
Quote: 引用:

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);
}
}

解释方法的意思,特别是From<?, ?> from, From<?, ?> to的意思,为什么这么写,有什么好处?


From<?, ?> from, From<?, ?> to 采用的Java为什么这样写,有什么好处详见这里
  相关解决方案