code: public CmsProperty readPropertyObject(
          CmsDbContext dbc,
          CmsResource resource,
          String key,
          boolean search,
          Locale locale)
      throws CmsException {
  
          // use the list reading method to obtain all properties for the resource
          List<CmsProperty> properties = readPropertyObjects(dbc, resource, search);
          // create a lookup property object and look this up in the result map
          CmsProperty result = null;
          // handle the case without locale separately to improve performance
          for (String localizedKey : CmsLocaleManager.getLocaleVariants(key, locale, true, false)) {
              int i = properties.indexOf(new CmsProperty(localizedKey, null, null));
              if (i >= 0) {
                  // property has been found in the map
                  result = properties.get(i);
                  // ensure the result value is not frozen
                  return result.cloneAsProperty();
              }
          }
          return CmsProperty.getNullProperty();
      }
docs: Reads a property object from a resource specified by a property name.<p>
  
  Returns <code>{@link CmsProperty#getNullProperty()}</code> if the property is not found.<p>
  
  @param dbc the current database context
  @param resource the resource where the property is read from
  @param key the property key name
  @param search if <code>true</code>, the property is searched on all parent folders of the resource.
  if it's not found attached directly to the resource.
  @param locale the locale for which the property should be read.
  
  @return the required property, or <code>{@link CmsProperty#getNullProperty()}</code> if the property was not found
  
  @throws CmsException if something goes wrong