Package org.openrdf.sail.rdbms.algebra.SqlCase

Examples of org.openrdf.sail.rdbms.algebra.SqlCase.Entry


    entries = node.getEntries();
    if (entries.isEmpty()) {
      replace(node, new SqlNull());
    }
    else if (entries.size() == 1) {
      Entry entry = entries.get(0);
      if (entry.getCondition() instanceof TrueValue) {
        replace(node, entry.getResult().clone());
      }
      else if (entry.getCondition() instanceof FalseValue) {
        replace(node, new SqlNull());
      }
      else if (entry.getCondition() instanceof SqlNot) {
        SqlNot not = (SqlNot)entry.getCondition();
        if (not.getArg() instanceof SqlIsNull) {
          SqlIsNull is = (SqlIsNull)not.getArg();
          if (is.getArg().equals(entry.getResult())) {
            replace(node, entry.getResult().clone());
          }
        }
      }
    }
  }
View Full Code Here


    entries = node.getEntries();
    if (entries.isEmpty()) {
      replace(node, new SqlNull());
    }
    else if (entries.size() == 1) {
      Entry entry = entries.get(0);
      if (entry.getCondition() instanceof TrueValue) {
        replace(node, entry.getResult().clone());
      }
      else if (entry.getCondition() instanceof FalseValue) {
        replace(node, new SqlNull());
      }
      else if (entry.getCondition() instanceof SqlNot) {
        SqlNot not = (SqlNot)entry.getCondition();
        if (not.getArg() instanceof SqlIsNull) {
          SqlIsNull is = (SqlIsNull)not.getArg();
          if (is.getArg().equals(entry.getResult())) {
            replace(node, entry.getResult().clone());
          }
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.sail.rdbms.algebra.SqlCase.Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.