private void addRevisionRestriction(
Parameters rootParameters, String revisionProperty, String revisionEndProperty,
boolean addAlias, boolean inclusive) {
// e.revision <= _revision and (e.endRevision > _revision or e.endRevision is null)
Parameters subParm = rootParameters.addSubParameters( "or" );
rootParameters.addWhereWithNamedParam( revisionProperty, addAlias, inclusive ? "<=" : "<", REVISION_PARAMETER );
subParm.addWhereWithNamedParam(
revisionEndProperty + ".id",
addAlias,
inclusive ? ">" : ">=",
REVISION_PARAMETER
);
subParm.addWhere( revisionEndProperty, addAlias, "is", "null", false );
}