protected Pair<PlainSchema, PlainAttrValue> check(final AttributeCond cond, final AnyTypeKind kind) { AnyUtils anyUtils = anyUtilsFactory.getInstance(kind); PlainSchema schema = schemaDAO.find(cond.getSchema()); if (schema == null) { LOG.warn("Ignoring invalid schema '{}'", cond.getSchema()); throw new IllegalArgumentException(); } PlainAttrValue attrValue = schema.isUniqueConstraint() ? anyUtils.newPlainAttrUniqueValue() : anyUtils.newPlainAttrValue(); try { if (cond.getType() != AttributeCond.Type.LIKE && cond.getType() != AttributeCond.Type.ILIKE && cond.getType() != AttributeCond.Type.ISNULL && cond.getType() != AttributeCond.Type.ISNOTNULL) { ((JPAPlainSchema) schema).validator().validate(cond.getExpression(), attrValue); } } catch (ValidationException e) { LOG.error("Could not validate expression '" + cond.getExpression() + "'", e); throw new IllegalArgumentException(); } return Pair.of(schema, attrValue); }
@Override public void add(final String value, final AnyUtils anyUtils) { checkNonNullSchema(); PlainAttrValue attrValue; if (getSchema().isUniqueConstraint()) { attrValue = anyUtils.newPlainAttrUniqueValue(); ((PlainAttrUniqueValue) attrValue).setSchema(getSchema()); } else { attrValue = anyUtils.newPlainAttrValue(); } add(value, attrValue); }
switch (intAttrName.getSchemaType()) { case PLAIN: PlainAttrValue value = anyUtils.newPlainAttrValue();
PlainAttrValue attrValue = anyUtils.newPlainAttrValue(); if (computed.getType() != AttributeCond.Type.LIKE && computed.getType() != AttributeCond.Type.ILIKE
AnyUtils anyUtils = anyUtilsFactory.getInstance(reference); if (intAttrName.getField() != null) { PlainAttrValue attrValue = anyUtils.newPlainAttrValue(); : derAttrHandler.getValue(reference, membership, derSchema); if (derValue != null) { PlainAttrValue attrValue = anyUtils.newPlainAttrValue(); attrValue.setStringValue(derValue); values.add(attrValue); : virAttrHandler.getValues(reference, membership, virSchema); virValues.forEach(virValue -> { PlainAttrValue attrValue = anyUtils.newPlainAttrValue(); attrValue.setStringValue(virValue); values.add(attrValue); flatMap(role -> role.getPrivileges(application).stream()). forEach(privilege -> { PlainAttrValue attrValue = anyUtils.newPlainAttrValue(); attrValue.setStringValue(privilege.getKey()); values.add(attrValue);