本文整理汇总了Java中net.sf.jsqlparser.statement.select.SelectItem.accept方法的典型用法代码示例。如果您正苦于以下问题:Java SelectItem.accept方法的具体用法?Java SelectItem.accept怎么用?Java SelectItem.accept使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jsqlparser.statement.select.SelectItem
的用法示例。
在下文中一共展示了SelectItem.accept方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect plainSelect) {
for (SelectItem item : plainSelect.getSelectItems()) {
item.accept(this);
}
if (itemsExpr.size() > 1) {
BinaryExpression binExpr = createBinaryExpression();
binExpr.setLeftExpression(itemsExpr.get(0).getExpression());
for (int i = 1; i < itemsExpr.size() - 1; i++) {
binExpr.setRightExpression(itemsExpr.get(i).getExpression());
BinaryExpression binExpr2 = createBinaryExpression();
binExpr2.setLeftExpression(binExpr);
binExpr = binExpr2;
}
binExpr.setRightExpression(itemsExpr.get(itemsExpr.size() - 1).getExpression());
SelectExpressionItem sei = new SelectExpressionItem();
sei.setExpression(binExpr);
plainSelect.getSelectItems().clear();
plainSelect.getSelectItems().add(sei);
}
((SelectExpressionItem) plainSelect.getSelectItems().get(0)).setAlias(new Alias(alias));
}
示例2: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect plainSelect) {
if (plainSelect.getSelectItems() != null) {
for (SelectItem item : plainSelect.getSelectItems()) {
item.accept(this);
}
}
if (plainSelect.getFromItem() != null) {
plainSelect.getFromItem().accept(this);
}
if (plainSelect.getJoins() != null) {
for (Join join : plainSelect.getJoins()) {
join.getRightItem().accept(this);
}
}
if (plainSelect.getWhere() != null) {
plainSelect.getWhere().accept(this);
}
if (plainSelect.getOracleHierarchical() != null) {
plainSelect.getOracleHierarchical().accept(this);
}
}
示例3: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
public void visit(PlainSelect plainSelect) {
List<SelectItem> cols = plainSelect.getSelectItems();
for(SelectItem col : cols){
col.accept(this);
}
if(plainSelect.getFromItem()!=null){
plainSelect.getFromItem().accept(this);
}
if (plainSelect.getJoins() != null) {
for (Iterator joinsIt = plainSelect.getJoins().iterator(); joinsIt.hasNext();) {
Join join = (Join) joinsIt.next();
join.getRightItem().accept(this);
}
}
if (plainSelect.getWhere() != null)
plainSelect.getWhere().accept(this);
}
示例4: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void visit(PlainSelect select) {
if (!CollectionUtils.isEmpty(select.getGroupByColumnReferences())
|| !CollectionUtils.isEmpty(select.getJoins())) {
isSimple = false;
} else {
select.getFromItem().accept(this);
for (SelectItem item : (List<SelectItem>) select.getSelectItems()) {
item.accept(this);
}
}
}
示例5: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect plainSelect) {
for (Object oItem : plainSelect.getSelectItems()) {
SelectItem item = (SelectItem) oItem;
item.accept(this);
}
}
示例6: getSelectItem
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
private SelectItemList getSelectItem(PlainSelect plainSelect)
{
mSelectItems = new SelectItemList();
List<SelectItem> selectItemExpressions = plainSelect.getSelectItems();
for (SelectItem selectItem : selectItemExpressions) {
selectItem.accept(this);
}
return mSelectItems;
}
示例7: visit
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
@Override
public void visit(WithItem wi) {
if (wi.getWithItemList() != null) {
for (SelectItem si: wi.getWithItemList()) {
si.accept(this);
}
}
wi.getSelectBody().accept(this);
}
示例8: parse
import net.sf.jsqlparser.statement.select.SelectItem; //导入方法依赖的package包/类
public void parse(List<SelectItem> selectItems)
{
for (SelectItem selectItem : selectItems) {
selectItem.accept(this);
}
}