@Override public String getFieldNameFor(Type<?> propertyType) { for (String typeMapping : typeMappings) { String[] mapping = typeMapping.split("="); if (mapping.length == 2 && mapping[0] != null && mapping[1] != null) { Type<?> type = Type.fromString(mapping[0]); if (type != null && type.tag() == propertyType.tag()) { return mapping[1]; } } } return null; }
@Override public String getFieldNameFor(Type<?> propertyType) { for (String typeMapping : typeMappings) { String[] mapping = typeMapping.split("="); if (mapping.length == 2 && mapping[0] != null && mapping[1] != null) { Type<?> type = Type.fromString(mapping[0]); if (type != null && type.tag() == propertyType.tag()) { return mapping[1]; } } } return null; }
/** * Returns the numeric constant value of the type with the specified name. * * In contrast to {@link javax.jcr.PropertyType#valueFromName(String)} this method * requires all type names to be all upper case. * See also: OAK-294 and http://java.net/jira/browse/JSR_283-811 * * @param name the name of the property type. * @return the numeric constant value. * @throws IllegalStateException if {@code name} is not a valid property type name. */ public static int valueFromName(String name) { Type<?> type = Type.fromString(name); if (type.isArray()) { throw new IllegalStateException("unknown property type: " + name); } return type.tag(); }
/** * Returns the numeric constant value of the type with the specified name. * * In contrast to {@link javax.jcr.PropertyType#valueFromName(String)} this method * requires all type names to be all upper case. * See also: OAK-294 and http://java.net/jira/browse/JSR_283-811 * * @param name the name of the property type. * @return the numeric constant value. * @throws IllegalStateException if {@code name} is not a valid property type name. */ public static int valueFromName(String name) { Type<?> type = Type.fromString(name); if (type.isArray()) { throw new IllegalStateException("unknown property type: " + name); } return type.tag(); }
/** * Returns the numeric constant value of the type with the specified name. * * In contrast to {@link javax.jcr.PropertyType#valueFromName(String)} this method * requires all type names to be all upper case. * See also: OAK-294 and http://java.net/jira/browse/JSR_283-811 * * @param name the name of the property type. * @return the numeric constant value. * @throws IllegalStateException if {@code name} is not a valid property type name. */ public static int valueFromName(String name) { Type<?> type = Type.fromString(name); if (type.isArray()) { throw new IllegalStateException("unknown property type: " + name); } return type.tag(); }
@Override public String getFieldNameFor(Type<?> propertyType) { Iterable<String> typeMappings = getStringValuesFor(Properties.TYPE_MAPPINGS); if (typeMappings != null) { for (String typeMapping : typeMappings) { String[] mapping = typeMapping.split("="); if (mapping.length == 2 && mapping[0] != null && mapping[1] != null) { Type<?> type = Type.fromString(mapping[0]); if (type != null && type.tag() == propertyType.tag()) { return mapping[1]; } } } } return null; }
@Override public String getFieldNameFor(Type<?> propertyType) { Iterable<String> typeMappings = getStringValuesFor(Properties.TYPE_MAPPINGS); if (typeMappings != null) { for (String typeMapping : typeMappings) { String[] mapping = typeMapping.split("="); if (mapping.length == 2 && mapping[0] != null && mapping[1] != null) { Type<?> type = Type.fromString(mapping[0]); if (type != null && type.tag() == propertyType.tag()) { return mapping[1]; } } } } return null; }
Type.fromString(TreeUtil.getString(definition, JCR_REQUIREDTYPE)); if (requiredType != Type.UNDEFINED) { if (TreeUtil.getBoolean(definition, JCR_MULTIPLE)) {
Type.fromString(TreeUtil.getString(definition, JCR_REQUIREDTYPE)); if (requiredType != Type.UNDEFINED) { if (TreeUtil.getBoolean(definition, JCR_MULTIPLE)) {
Type.fromString(TreeUtil.getString(definition, JCR_REQUIREDTYPE)); if (requiredType != Type.UNDEFINED) { if (TreeUtil.getBoolean(definition, JCR_MULTIPLE)) {