merged lookups and constrant in java backend rule