jaskell.sql.Not Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.sql;
import jaskell.script.Directive;
import jaskell.script.Parameter;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class Not extends Predicate {
Optional _predicate;
Not(Directive predicate){
_predicate = Optional.of(predicate);
}
Not(){
_predicate = Optional.empty();
}
@Override
public String script() {
if (_predicate.isPresent()){
return String.format("NOT(%s)", _predicate.get().script());
} else {
return "NOT ";
}
}
@Override
public List> parameters() {
if(_predicate.isPresent()){
return _predicate.get().parameters();
} else {
return new ArrayList<>();
}
}
public Exists exists(Directive directive) {
Exists re = new Exists(directive);
re._prefix = Optional.of(this);
return re;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy