本文整理汇总了Java中org.ofbiz.entity.model.DynamicViewEntity.addAliasAll方法的典型用法代码示例。如果您正苦于以下问题:Java DynamicViewEntity.addAliasAll方法的具体用法?Java DynamicViewEntity.addAliasAll怎么用?Java DynamicViewEntity.addAliasAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ofbiz.entity.model.DynamicViewEntity
的用法示例。
在下文中一共展示了DynamicViewEntity.addAliasAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: planSelect
import org.ofbiz.entity.model.DynamicViewEntity; //导入方法依赖的package包/类
@Override
public EntitySelectPlan planSelect(SQLSelect selectStatement) {
DynamicViewEntity dve = new DynamicViewEntity();
Unioned unioned = selectStatement.getUnioned();
if (unioned != null) {
throw new IllegalArgumentException("union views not yet supported");
}
SelectGroup selectGroup = unioned.getGroup();
Table table = selectGroup.getTable();
addMember(dve, table.getTableName());
addJoined(dve, table.getTableName().getAlias(), table.getJoined());
if (selectGroup.getFieldAlls() != null) {
for (FieldAll fieldAll: selectGroup.getFieldAlls()) {
List<String> excludes = new LinkedList<String>();
for (String exclude: fieldAll) {
excludes.add(exclude);
}
if (excludes.isEmpty()) {
excludes = null;
}
dve.addAliasAll(fieldAll.getAlias(), null, excludes);
}
}
if (selectStatement.getRelations() != null) {
for (Relation relation: selectStatement.getRelations().values()) {
dve.addRelation(relation.getType(), relation.getTitle(), relation.getEntityName(), buildKeyMaps(relation));
}
}
List<String> groupBy = selectGroup.getGroupBy();
if (groupBy == null) {
groupBy = Collections.emptyList();
}
if (selectGroup.getFieldDefs() != null) {
for (FieldDef fieldDef: selectGroup.getFieldDefs()) {
addFieldDef(dve, groupBy, fieldDef.getAlias(), fieldDef);
}
}
List<String> orderBy;
if (selectStatement.getOrderBy() == null) {
orderBy = null;
} else {
orderBy = new LinkedList<String>();
for (OrderByItem orderByItem: selectStatement.getOrderBy()) {
orderBy.add(orderByItem.toString());
}
}
return new EntitySelectPlan(dve, plan(selectGroup.getWhereCondition()), plan(selectGroup.getHavingCondition()), orderBy);
}