Examples of SqlBuilder


Examples of br.com.objectos.comuns.relational.search.SQLBuilder

    this.sqlProvider = sqlProvider;
  }

  @Override
  public <E> List<E> list(SearchQuery<E> query) {
    SQLBuilder sql = sqlProvider.get();
    query.configure(sql);
    return exec.list(sql);
  }
View Full Code Here

Examples of com.blogger.tcuri.appserver.db.SqlBuilder

    public Resolution execute(ActionContext context) throws Exception {

        String content = context.param("content");

        if (Utils.isNotBlank(content)) {
            SqlBuilder sql = new SqlBuilder(
                    "insert into messages (content) values (?)", content);
            DbUtils.execute(sql);
        }

        return CrudLogic.read();
View Full Code Here

Examples of com.blogger.tcuri.appserver.db.SqlBuilder

    public Resolution execute(ActionContext context) throws Exception {

        String id = context.param("id");

        if (Utils.isNotBlank(id)) {
            SqlBuilder sql = new SqlBuilder(
                    "delete from messages where id=?", id);
            DbUtils.execute(sql);
        }

        return CrudLogic.read();
View Full Code Here

Examples of com.blogger.tcuri.appserver.db.SqlBuilder

        String id = context.param("id");
        String content = context.param("content");

        if (Utils.isNotBlank(id) && Utils.isNotBlank(content)) {
            SqlBuilder sql = new SqlBuilder(
                    "update messages set content=? where id=?", content, id);
            DbUtils.execute(sql);
        }

        return CrudLogic.read();
View Full Code Here

Examples of com.blogger.tcuri.appserver.db.SqlBuilder

import com.blogger.tcuri.appserver.resolution.Resolution;

public class CrudLogic {

    public static Resolution read() throws SQLException {
        SqlBuilder sql = new SqlBuilder(
                "select id,content,formatdatetime(updatetime, 'yyyy-MM-dd HH:mm:ss') as updatetime from messages order by id desc");

        List<Map<String, Object>> messageList = DbUtils.selectList(sql,
                MapHandler.INSTANCE);
View Full Code Here

Examples of org.apache.camel.builder.sql.SqlBuilder

*/
public class SqlLanguage implements Language, IsSingleton {
  
    public Predicate createPredicate(String expression) {
        try {
            SqlBuilder builder = SqlBuilder.sql(expression);
            return builder;
        } catch (QueryParseException e) {
            RuntimeException exception = new RuntimeCamelException("Canont create the SqlBuilder.", e);
            throw exception;
        }
View Full Code Here

Examples of org.apache.camel.builder.sql.SqlBuilder

       
    }

    public Expression createExpression(String expression) {
        try {
            SqlBuilder builder = SqlBuilder.sql(expression);
            return builder;
        } catch (QueryParseException e) {
            RuntimeException exception = new RuntimeCamelException("Canont create the SqlBuilder.", e);
            throw exception;
        }
View Full Code Here

Examples of org.apache.camel.builder.sql.SqlBuilder

*/
public class SqlLanguage implements Language, IsSingleton {
  
    public Predicate createPredicate(String expression) {
        try {
            SqlBuilder builder = SqlBuilder.sql(expression);
            return builder;
        } catch (QueryParseException e) {
            RuntimeException exception = new RuntimeCamelException("Canont create the SqlBuilder.", e);
            throw exception;
        }
View Full Code Here

Examples of org.apache.camel.builder.sql.SqlBuilder

       
    }

    public Expression createExpression(String expression) {
        try {
            SqlBuilder builder = SqlBuilder.sql(expression);
            return builder;
        } catch (QueryParseException e) {
            RuntimeException exception = new RuntimeCamelException("Canont create the SqlBuilder.", e);
            throw exception;
        }
View Full Code Here

Examples of org.apache.camel.builder.sql.SqlBuilder

*/
public class SqlLanguage implements Language {
  
    public Predicate createPredicate(String expression) {
        try {
            SqlBuilder builder = SqlBuilder.sql(expression);
            return builder;
        } catch (QueryParseException e) {
            RuntimeException exception = new RuntimeCamelException("Canont create the SqlBuilder.", e);
            throw exception;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.