Orders by the specified property name (defaults to ascending)

@param propertyName The property name to order by
@return A Order instance
9128
public org.grails.datastore.mapping.query.api.Criteria order(String propertyName) {
        if (criteria == null) {
            throwRuntimeException(new IllegalArgumentException("Call to [order] with propertyName [" +
                    propertyName + "]not allowed here."));
        }
        propertyName = calculatePropertyName(propertyName);
        Order o = Order.asc(propertyName);
        addOrderInternal(this.criteria, o);
        return this;
    }
226567
public Swagger2MarkupConfigBuilder withPropertyOrdering(Comparator<String> propertyOrdering) {
        Validate.notNull(propertyOrdering, "%s must not be null", "propertyOrdering");

        config.propertyOrderBy = OrderBy.CUSTOM;
        config.propertyOrdering = propertyOrdering;
        return this;
    }
708583
public T simonProperty(Simon simon, String propertyName) throws IOException {
		Getter getter = GetterFactory.getGetter(simon.getClass(), propertyName);
		if (getter != null) {
			value(getter.get(simon), getter.getSubType());
		}
		return (T) this;
	}
589092
SortPropertyOrder convert2SortPropertyOrder(final SortOrder order) {
		switch (order) {
		case ASCENDING:
			return SortPropertyOrder.ASCENDING;
		case DESCENDING:
			return SortPropertyOrder.DESCENDING;
		default:
			throw new IllegalArgumentException("Unknown SortOrder: " + order);
		}
	}
239728
public static <S extends Storable> Comparator<S>
        createComparator(OrderedProperty<S>... properties)
    {
        if (properties == null || properties.length == 0 || properties[0] == null) {
            throw new IllegalArgumentException();
        }

        Class<S> type = properties[0].getChainedProperty().getPrimeProperty().getEnclosingType();

        BeanComparator bc = BeanComparator.forClass(type);

        for (OrderedProperty<S> property : properties) {
            if (property == null) {
                throw new IllegalArgumentException();
            }
            bc = orderBy(bc, property);
        }

        return bc;
    }
839240
public static Sort by(final String... properties) {

    Assert.notNull(properties, "Properties must not be null!");

    return properties.length == 0 ? Sort.unsorted() : new Sort(properties);
  }
1270822
@SuppressWarnings( "unchecked" )
    public <T> T get( final String propertyName )
    {
        return (T) m_properties.get( propertyName );
    }
1120989
public QueryBuilder<T, ID> orderBy(String columnName, boolean ascending) {
		FieldType fieldType = verifyColumnName(columnName);
		if (fieldType.isForeignCollection()) {
			throw new IllegalArgumentException("Can't orderBy foreign collection field: " + columnName);
		}
		addOrderBy(new OrderBy(columnName, ascending));
		return this;
	}
105572
public static <S extends Storable> OrderedProperty<S> get(StorableProperty<S> property,
                                                              Direction direction) {
        return get(ChainedProperty.get(property), direction);
    }
935272
public static <T> List<T> sortByProperty(List<T> list, String property) {
		return sort(list, new PropertyComparator<>(property));
	}
657807
public static <T> PositionFactory<Object, T> optional(String propertyName) {
        final boolean optional = true;
        return new PositionFactory<>(propertyName, optional);
    }
347845
public List<BeanId> getReference(final String propertyName) {
        List<BeanId> values = references.get(propertyName);
        if (values == null) {
            return null;
        }
        return values;
    }
286363
public org.grails.datastore.mapping.query.api.Criteria eqAll(String propertyName,
                                                                 @SuppressWarnings("rawtypes") QueryableCriteria propertyValue) {
        addToCriteria(Property.forName(propertyName).eqAll(convertToHibernateCriteria(propertyValue)));
        return this;
    }
156829
def sort_by(self, property, order="asc"):
        
        self.__prepare()
        if isinstance(self._json_data, list):
            if order == "asc":
                self._json_data = sorted(
                    self._json_data,
                    key=lambda x: x.get(property)
                )
            else:
                self._json_data = sorted(
                    self._json_data,
                    key=lambda x: x.get(property),
                    reverse=True
                )

        return self
567318
public function getByName($propertyName)
    {
        $foundList = new self();
        $list = $this->getIterator();
        foreach ($list as $property) {
            if ((is_array($propertyName) && in_array($property->getName(), $propertyName))
                || ($property->getName() === $propertyName)
            ) {
                $foundList->add($property);
            }
        }

        return $foundList;
    }
759527
public static Properties propertiesByInstanceName(String instanceName) {
        Properties properties = new Properties();
        properties.setProperty(HAZELCAST_INSTANCE_NAME, instanceName);
        return properties;
    }
215172
private static String getterName(String propertyName) {
        if ((propertyName == null) || (propertyName.length() == 0)) {
            return propertyName;
        }
        return "get" + Character.toUpperCase(propertyName.charAt(0))
                + propertyName.substring(1);
    }