All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.sql.api.impl.cmd.struct.ForUpdate Maven / Gradle / Ivy

There is a newer version: 1.7.6-RC2
Show newest version
package db.sql.api.impl.cmd.struct;

import db.sql.api.Cmd;
import db.sql.api.SqlBuilderContext;
import db.sql.api.cmd.struct.IForUpdate;
import db.sql.api.impl.tookit.SqlConst;

public class ForUpdate implements IForUpdate {

    private boolean wait = true;

    @Override
    public StringBuilder sql(Cmd module, Cmd parent, SqlBuilderContext context, StringBuilder sqlBuilder) {
        sqlBuilder.append(wait ? SqlConst.FOR_UPDATE : SqlConst.FOR_UPDATE_NO_WAIT);
        return sqlBuilder;
    }

    @Override
    public boolean contain(Cmd cmd) {
        return false;
    }

    @Override
    public void setWait(boolean wait) {
        this.wait = wait;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy