public static ResultIterator findAll(Session session, String locale, long partitionOid) {
    String localeString;

    if (locale == null) {
      localeString = LOCALE_DEFAULT;
    } else {
      localeString = locale.toString();
    }

    return session.getIterator( //
        PropertyPersistor.class, //
        QueryExtension.where(
            Predicates.andTerm( //
                Predicates.isEqual(FR__LOCALE, localeString), //
                Predicates.isEqual(FR__PARTITION, partitionOid))));
  }
  /** Reserved for future use. */
  public static PropertyPersistor findByName(String name, String locale, long partitionOid) {
    String localeString;

    if (locale == null) {
      localeString = LOCALE_DEFAULT;
    } else {
      localeString = locale.toString();
    }

    PropertyPersistor propertyPersistor =
        (PropertyPersistor)
            SessionFactory.getSession(SessionFactory.AUDIT_TRAIL)
                .findFirst(
                    PropertyPersistor.class,
                    QueryExtension.where(
                        Predicates.andTerm(
                            Predicates.isEqual(FR__NAME, name),
                            Predicates.isEqual(FR__LOCALE, localeString),
                            Predicates.isEqual(FR__PARTITION, partitionOid))));

    if ((null == propertyPersistor) && locale != null) {
      propertyPersistor =
          (PropertyPersistor)
              SessionFactory.getSession(SessionFactory.AUDIT_TRAIL)
                  .findFirst(
                      PropertyPersistor.class,
                      QueryExtension.where(
                          Predicates.andTerm(
                              Predicates.isEqual(FR__NAME, name),
                              Predicates.isEqual(FR__LOCALE, LOCALE_DEFAULT),
                              Predicates.isEqual(FR__PARTITION, partitionOid))));
    }
    return propertyPersistor;
  }