List of usage examples for com.google.common.collect Table containsRow
boolean containsRow(@Nullable Object rowKey);
From source file:com.fredhopper.core.connector.index.generate.validator.TextAttributeValidator.java
@Override protected boolean hasValidValueId(final FhAttributeData attribute, final List<Violation> violations) { final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues(); if (!values.containsRow(Optional.empty())) { rejectValue(attribute, violations, "The \"text\" attribute value does not have an identifier."); return false; }/*w w w . ja v a 2 s. c o m*/ return true; }
From source file:com.fredhopper.core.connector.index.generate.validator.AssetAttributeValidator.java
@Override protected boolean hasValidValueId(final FhAttributeData attribute, final List<Violation> violations) { final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues(); if (!values.containsRow(Optional.empty())) { rejectValue(attribute, violations, "The \"asset\" attribute value does not have an identifier."); return false; }// ww w. j a v a 2 s. c om return true; }
From source file:com.fredhopper.core.connector.index.generate.validator.IntAttributeValidator.java
@Override protected boolean hasValidValueId(final FhAttributeData attribute, final List<Violation> violations) { final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues(); if (!values.containsRow(Optional.empty())) { rejectValue(attribute, violations, "The \"int\" attribute value does not have an identifier."); return false; }/* w ww . j a v a 2s . c o m*/ return true; }
From source file:com.fredhopper.core.connector.index.generate.validator.FloatAttributeValidator.java
@Override protected boolean hasValidValueId(final FhAttributeData attribute, final List<Violation> violations) { final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues(); if (!values.containsRow(Optional.empty())) { rejectValue(attribute, violations, "The \"float\" attribute value does not have an identifier."); return false; }/*w w w . j a v a2 s.c o m*/ return true; }
From source file:com.garethahealy.camelmapstruct.converter.MapStructTypeConverter.java
private String findMethodName(Class<?> from, Class<?> to) throws IllegalAccessException { String methodName;//w ww.ja va 2 s .c o m Table<Class<?>, Class<?>, String> resolved = configuration.getResolvedMappingMethods(); if (resolved.containsRow(from) && resolved.containsColumn(to)) { methodName = resolved.get(from, to); } else { String innerMessage = "Did'nt find method on mapper " + mapper.getClass().getCanonicalName() + " that container a parameter of " + from.getCanonicalName() + "; Found possible matches: " + StringUtils.join(resolved.values(), ", "); LOG.error(innerMessage); throw new IllegalAccessException(innerMessage); } return methodName; }