@Override public List<Class<?>> getManagedClasses() { return resolver.getManagedClasses(); }
@Override public void setObject(Object object) { Object reference = resolver.getReference(object); property.setValue(reference); }
@Override public Object fetch() { return resolver.fetch(property.getValue()); }
@Override public boolean validate(Object context) { return resolver.validate(property.getValue(), context); }
@Override public boolean validate(Object value, Object context) throws IllegalStateException { checkConfig(); return !validation || fetch(value, context) != null; }
@Override public String getErrorMessage(Object invalidValue, Locale locale) { return resolver.getConstraintErrorMessage(invalidValue, locale); } }
@Override public <T> T fetch(Class<T> type) { return resolver.fetch(type, doc.getPropertyValue(xpath)); }
@Override public boolean validate(Object context) { return resolver.validate(doc.getPropertyValue(xpath), context); }
@Override public List<Class<?>> getManagedClasses() { return resolver.getManagedClasses(); }
@Override public void setObject(Object object) { Serializable reference = resolver.getReference(object); doc.setPropertyValue(xpath, reference); }
@Override public boolean validate(Object value) throws IllegalStateException { checkConfig(); return !validation || fetch(value) != null; }
@Override public Object fetch(Object context) { return resolver.fetch(property.getValue(), context); }
@Override public boolean validate() { return resolver.validate(property.getValue()); }
@Override public <T> T fetch(Class<T> type) { return resolver.fetch(type, property.getValue()); }
@Override public boolean validate() { return resolver.validate(doc.getPropertyValue(xpath), doc.getCoreSession()); }
@Override public Object fetch(Object context) { return resolver.fetch(doc.getPropertyValue(xpath), context); }
/** * Validates some value references an existing entity, in the given context * * @param value The reference. * @param context A resolver-specific context allowing resolution of the value. * @return true if value could be resolved as an existing external reference, false otherwise. * @throws IllegalStateException If this resolver has not been configured. * @since 10.2 */ default boolean validate(Object value, Object context) { return validate(value); }
@Override public Object fetch() { return resolver.fetch(doc.getPropertyValue(xpath), doc.getCoreSession()); }
@Override public boolean validate(Object object) { if (object == null) { return true; } return resolver.validate(object); }
/** * Provides the entity referenced by a value, in the given context. * * @param value The reference. * @param context A resolver-specific context allowing resolution of the value. * @return The referenced entity, null if no entity matches the value. * @throws IllegalStateException If this resolver has not been configured. * @since 10.2 */ default Object fetch(Object value, Object context) { return fetch(value); }