/** * Retrieves the "objectClass" attribute from the entry, if available. * * @return The "objectClass" attribute from the entry, or {@code null} if * that attribute not available. */ public Attribute getObjectClassAttribute() { return getAttribute("objectClass"); }
/** * Retrieves the "objectClass" attribute from the entry, if available. * * @return The "objectClass" attribute from the entry, or {@code null} if * that attribute not available. */ public Attribute getObjectClassAttribute() { return getAttribute("objectClass"); }
/** * Retrieves the value for the specified attribute as a DN, if available. If * the attribute has more than one value, then the first value will be * returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Date value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a DN. */ public DN getAttributeValueAsDN(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsDN(); } }
/** * Retrieves the value for the specified attribute as an Integer, if * available. If the attribute has more than one value, then the first value * will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Integer value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as an Integer. */ public Integer getAttributeValueAsInteger(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsInteger(); } }
/** * Retrieves the value for the specified attribute as a DN, if available. If * the attribute has more than one value, then the first value will be * returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Date value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a DN. */ public DN getAttributeValueAsDN(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsDN(); } }
/** * Retrieves the value for the specified attribute as an Integer, if * available. If the attribute has more than one value, then the first value * will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Integer value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as an Integer. */ public Integer getAttributeValueAsInteger(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsInteger(); } }
/** * Retrieves the value for the specified attribute as a Boolean, if available. * If the attribute has more than one value, then the first value will be * returned. Values of "true", "t", "yes", "y", "on", and "1" will be * interpreted as {@code TRUE}. Values of "false", "f", "no", "n", "off", and * "0" will be interpreted as {@code FALSE}. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Boolean value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Boolean. */ public Boolean getAttributeValueAsBoolean(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsBoolean(); } }
/** * Retrieves the value for the specified attribute as a Date, formatted using * the generalized time syntax, if available. If the attribute has more than * one value, then the first value will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Date value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Date. */ public Date getAttributeValueAsDate(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsDate(); } }
/** * Retrieves the value for the specified attribute as a Long, if available. * If the attribute has more than one value, then the first value will be * returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Long value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Long. */ public Long getAttributeValueAsLong(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsLong(); } }
/** * Retrieves the value for the specified attribute as a Long, if available. * If the attribute has more than one value, then the first value will be * returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Long value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Long. */ public Long getAttributeValueAsLong(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsLong(); } }
/** * Retrieves the value for the specified attribute as a Date, formatted using * the generalized time syntax, if available. If the attribute has more than * one value, then the first value will be returned. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Date value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Date. */ public Date getAttributeValueAsDate(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsDate(); } }
/** * Retrieves the value for the specified attribute as a Boolean, if available. * If the attribute has more than one value, then the first value will be * returned. Values of "true", "t", "yes", "y", "on", and "1" will be * interpreted as {@code TRUE}. Values of "false", "f", "no", "n", "off", and * "0" will be interpreted as {@code FALSE}. * * @param attributeName The name of the attribute for which to retrieve the * value. It must not be {@code null}. * * @return The Boolean value parsed from the specified attribute, or * {@code null} if that attribute is not available or the value * cannot be parsed as a Boolean. */ public Boolean getAttributeValueAsBoolean(final String attributeName) { ensureNotNull(attributeName); final Attribute a = getAttribute(attributeName); if (a == null) { return null; } else { return a.getValueAsBoolean(); } }