constraintToString(state, buffer, con, q, schema, SAFENESS_SAFE, true); } else if (whs[0]) { StringBuffer buffer = state.getWhereBuffer(); constraintToString(state, buffer, con, q, schema, SAFENESS_SAFE, true); } else { throw new ObjectStoreException("Constraint " + con + " mixes WHERE"
constraintToString(state, buffer, con, q, schema, SAFENESS_SAFE, true); } else if (whs[0]) { StringBuffer buffer = state.getWhereBuffer(); constraintToString(state, buffer, con, q, schema, SAFENESS_SAFE, true); } else { throw new ObjectStoreException("Constraint " + con + " mixes WHERE"
constraintToString(state, buffer, subC, q, schema, newSafeness, (!negate) && (!disjunctive));
constraintToString(state, buffer, subC, q, schema, newSafeness, (!negate) && (!disjunctive));
if (c != null) { sql.append(" WHERE "); SqlGenerator.constraintToString(null, sql, c, null, getSchema(), SqlGenerator.SAFENESS_SAFE, true);
if (c != null) { sql.append(" WHERE "); SqlGenerator.constraintToString(null, sql, c, null, getSchema(), SqlGenerator.SAFENESS_SAFE, true);
public void testInvalidSafenesses() throws Exception { try { SqlGenerator.constraintToString(null, null, null, null, null, 3, false); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("Unknown ContainsConstraint safeness: 3", e.getMessage()); } try { SqlGenerator.constraintSetToString(null, null, null, null, null, 3, false); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("Unknown ContainsConstraint safeness: 3", e.getMessage()); } try { SqlGenerator.containsConstraintToString(null, null, null, null, null, 3, false); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("Unknown ContainsConstraint safeness: 3", e.getMessage()); } }