io.github.rongaru.javaee.backend.query.AbstractUpdateHelperQueryBuilder Maven / Gradle / Ivy
package io.github.rongaru.javaee.backend.query;
import java.util.Date;
import java.util.List;
public abstract class AbstractUpdateHelperQueryBuilder< Entity > extends AbstractCreateHelperQueryBuilder< Entity > {
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedDateEquals( Date updatedDate ) {
appendIntoStatementCriteria( " x.updatedDate = :updatedDate " );
appendIntoParameterMap( "updatedDate", updatedDate );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedDateNotEquals( Date updatedDate ) {
appendIntoStatementCriteria( " x.updatedDate <> :updatedDate " );
appendIntoParameterMap( "updatedDate", updatedDate );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedDateIn( List< Date > updatedDates ) {
appendIntoStatementCriteria( " x.updatedDate IN ( :updatedDateIn ) " );
appendIntoParameterMap( "updatedDateIn", updatedDates );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedDateNotIn( List< Date > updatedDates ) {
appendIntoStatementCriteria( " x.updatedDate NOT IN ( :updatedDateNotIn ) " );
appendIntoParameterMap( "updatedDateNotIn", updatedDates );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedByUserIdEquals( Long updatedByUserId ) {
appendIntoStatementCriteria( " x.updatedByUser.id = :updatedByUserId " );
appendIntoParameterMap( "updatedByUserId", updatedByUserId );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedByUserIdNotEquals( Long updatedByUserId ) {
appendIntoStatementCriteria( " x.updatedByUser.id <> :updatedByUserId " );
appendIntoParameterMap( "updatedByUserId", updatedByUserId );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedByUserIdIn( List< Long > updatedByUserIds ) {
appendIntoStatementCriteria( " x.updatedByUser.id IN ( :updatedByUserIdIn ) " );
appendIntoParameterMap( "updatedByUserIdIn", updatedByUserIds );
return this;
}
public AbstractUpdateHelperQueryBuilder< Entity > appendUpdatedByUserIdNotIn( List< Long > updatedByUserIds ) {
appendIntoStatementCriteria( " x.updatedByUser.id NOT IN ( :updatedByUserIdNotIn ) " );
appendIntoParameterMap( "updatedByUserIdNotIn", updatedByUserIds );
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy