本文整理汇总了Java中net.sf.jsqlparser.statement.select.PlainSelect.getOracleHierarchical方法的典型用法代码示例。如果您正苦于以下问题:Java PlainSelect.getOracleHierarchical方法的具体用法?Java PlainSelect.getOracleHierarchical怎么用?Java PlainSelect.getOracleHierarchical使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jsqlparser.statement.select.PlainSelect
的用法示例。
在下文中一共展示了PlainSelect.getOracleHierarchical方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的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);
}
}
示例2: visit
import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect ps) {
ps.getFromItem().accept(this);
if (ps.getJoins() != null) {
for (Join j : ps.getJoins()) {
j.getRightItem().accept(this);
}
}
if (ps.getWhere() != null) {
ps.getWhere().accept(this);
}
if (ps.getOracleHierarchical() != null) {
ps.getOracleHierarchical().accept(this);
}
}
示例3: plainSelectToStringAppendWithNoLock
import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
private static String plainSelectToStringAppendWithNoLock(PlainSelect plain) {
StringBuilder sql = new StringBuilder("SELECT ");
if (plain.getDistinct() != null)
sql.append(plain.getDistinct()).append(" ");
if (plain.getTop() != null)
sql.append(plain.getTop()).append(" ");
sql.append(PlainSelect.getStringList(plain.getSelectItems()));
if (plain.getFromItem() != null) {
sql.append(" FROM ").append(plain.getFromItem()).append(" WITH (NOLOCK) ");
if (plain.getJoins() != null) {
Iterator<Join> it = plain.getJoins().iterator();
while (it.hasNext()) {
Join join = it.next();
if (join.isSimple()) {
sql.append(", ").append(join).append(" WITH (NOLOCK) ");
} else {
String temp = join.toString().replace(join.getRightItem().toString(),
join.getRightItem().toString() + " WITH (NOLOCK) ");
sql.append(" ").append(temp);
}
}
}
if (plain.getWhere() != null)
sql.append(" WHERE ").append(plain.getWhere());
if (plain.getOracleHierarchical() != null)
sql.append(plain.getOracleHierarchical().toString());
sql.append(PlainSelect.getFormatedList(plain.getGroupByColumnReferences(), "GROUP BY"));
if (plain.getHaving() != null)
sql.append(" HAVING ").append(plain.getHaving());
sql.append(PlainSelect.orderByToString(plain.isOracleSiblings(), plain.getOrderByElements()));
if (plain.getLimit() != null)
sql.append(plain.getLimit());
}
return sql.toString();
}
示例4: visit
import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
@Override
public void visit(PlainSelect ps) {
// First collect FROM and JOIN items
ps.getFromItem().accept(this);
if (ps.getJoins() != null) {
for (Join j : ps.getJoins()) {
j.getRightItem().accept(this);
if (j.getOnExpression() != null) {
j.getOnExpression().accept(this);
}
if (j.getUsingColumns() != null) {
for (Iterator it1 = j.getUsingColumns().iterator(); it1.hasNext();) {
((Expression) it1.next()).accept(this);
}
}
}
}
// Next iterate over SELECT, WHERE and ORDER BY items
for (Iterator it = ps.getSelectItems().iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof SelectExpressionItem) {
((SelectExpressionItem) o).accept(this);
}
if (o instanceof AllColumns) {
((AllColumns) o).accept(this);
}
if (o instanceof AllTableColumns) {
((AllTableColumns) o).accept(this);
}
}
if (ps.getWhere() != null) {
ps.getWhere().accept(this);
}
if (ps.getOrderByElements() != null) {
for (Iterator it = ps.getOrderByElements().iterator(); it.hasNext();) {
((OrderByElement) it.next()).accept(this);
}
}
if (ps.getOracleHierarchical() != null) {
ps.getOracleHierarchical().accept(this);
}
}
示例5: visit
import net.sf.jsqlparser.statement.select.PlainSelect; //导入方法依赖的package包/类
/**
* SelectVisitor
* @param ps
*/
@Override
public void visit(PlainSelect ps) {
// First collect FROM and JOIN items
ps.getFromItem().accept(this);
if (ps.getJoins() != null) {
for (Join j : ps.getJoins()) {
j.getRightItem().accept(this);
if (j.getOnExpression() != null) {
j.getOnExpression().accept(expParser);
}
if (j.getUsingColumns() != null) {
for (Iterator<?> it1 = j.getUsingColumns().iterator(); it1.hasNext();) {
((Expression) it1.next()).accept(expParser);
}
}
}
}
// Next iterate over SELECT, WHERE and ORDER BY items
for (Object o: ps.getSelectItems()) {
if (o instanceof SelectExpressionItem) {
((SelectExpressionItem) o).accept(this);
}
if (o instanceof AllColumns) {
((AllColumns) o).accept(this);
}
if (o instanceof AllTableColumns) {
((AllTableColumns) o).accept(this);
}
}
if (ps.getWhere() != null) {
ps.getWhere().accept(expParser);
}
if (ps.getOrderByElements() != null) {
for (Iterator<?> it = ps.getOrderByElements().iterator(); it.hasNext();) {
((OrderByElement) it.next()).accept(this);
}
}
if (ps.getOracleHierarchical() != null) {
ps.getOracleHierarchical().accept(expParser);
}
}