Create {@code OrderBy} object with information about ordering.

@param assetType      information about Asset type.
@param defaultOrderBy defines methods for the definition of a VersionOne Attribute.
@return created {@code OrderBy}.
551207
public OrderBy buildOrderBy(IAssetType assetType,
                                IAttributeDefinition defaultOrderBy) {
        OrderBy order = new OrderBy();

        if (orderBy.size() > 0) {

            for (String s : orderBy) {
                order.minorSort(assetType
                        .getAttributeDefinition(resolvePropertyName(s)),
                        OrderBy.Order.Ascending);
            }
        } else {
            if (defaultOrderBy != null)
                order.minorSort(defaultOrderBy, OrderBy.Order.Ascending);
        }
        return order;
    }
832625
@Override
    public MapEntry<K, V> getDefaultInstanceForType() {
        return new MapEntry<K, V>(metadata, metadata.defaultKey, metadata.defaultValue);
    }
1203164
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CommerceOrder addCommerceOrder(CommerceOrder commerceOrder) {
		commerceOrder.setNew(true);

		return commerceOrderPersistence.update(commerceOrder);
	}
1219336
@Override
	@Transactional(enabled = false)
	public CommerceOrder createCommerceOrder(long commerceOrderId) {
		return commerceOrderPersistence.create(commerceOrderId);
	}
1198985
protected void defaultFindOrderBy(Query<MODEL> query) {
        if (StringUtils.isNotBlank(defaultFindOrderBy)) {
            // see if we should use the default orderBy clause
            OrderBy<MODEL> orderBy = query.orderBy();
            if (orderBy.isEmpty()) {
                query.orderBy(defaultFindOrderBy);
            }
        }
    }
691304
public OrderingType<WebFragmentType<T>> getOrCreateOrdering()
   {
      List<Node> nodeList = childNode.get("ordering");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new OrderingTypeImpl<WebFragmentType<T>>(this, "ordering", childNode, nodeList.get(0));
      }
      return createOrdering();
   }
765110
@Override
	public AppEngineGetList<E> sort(Order<?, ?>... orders) {
		if (orders == null) {
			throw new IllegalArgumentException("'orders' must not be [" + orders + "]");
		}
		
		this.orders = Arrays.asList(orders);
		return this;
	}
1165861
public RuntimeEnvironmentBuilder addAsset(Resource asset, ResourceType type) {
        if (asset == null || type == null) {
            return this;
        }
        _runtimeEnvironment.addAsset(asset, type);
        return this;
    }
1162860
public FacesConfigOrderingType<WebFacesConfigDescriptor> getOrCreateOrdering()
   {
      List<Node> nodeList = model.get("ordering");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigOrderingTypeImpl<WebFacesConfigDescriptor>(this, "ordering", model, nodeList.get(0));
      }
      return createOrdering();
   }
802794
public static ComparatorItem fromSortOrder(Sort.Order sortOrder) {
    if (sortOrder == null || sortOrder.getProperty() == null
        || sortOrder.getProperty().trim().length() == 0) {
      return null;
    }
    boolean nullIsFirst = Sort.NullHandling.NULLS_FIRST.equals(sortOrder.getNullHandling());
    return new ComparatorItem(sortOrder.getProperty(), sortOrder.isAscending(),
        sortOrder.isIgnoreCase(),
        nullIsFirst);
  }
1181860
public IFilterTerm buildFilter(IAssetType assetType, V1Instance instance) {
        FilterBuilder builder = new FilterBuilder(assetType, instance);

        internalModifyFilter(builder);
        internalModifyState(builder);
        return builder.root.hasTerm() ? builder.root : null;
    }
893057
public static BitfinexOrderBookSymbol orderBook(final BitfinexCurrencyPair currencyPair, 
    		final BitfinexOrderBookSymbol.Precision precision,
    		final BitfinexOrderBookSymbol.Frequency frequency, final int pricePoints) {
    	
        if (precision == BitfinexOrderBookSymbol.Precision.R0) {
            throw new IllegalArgumentException("Use BitfinexSymbols#rawOrderBook() factory method instead");
        }
        
        return new BitfinexOrderBookSymbol(currencyPair, precision, frequency, pricePoints);
    }
14479
public static EntityActionOperation createFileInfos(String assetId) {
        String encodedId;
        try {
            encodedId = URLEncoder.encode(assetId, "UTF-8");
        } catch (UnsupportedEncodingException ex) {
            // This can never happen unless JVM is broken
            throw new RuntimeException(ex);
        }
        return new DefaultActionOperation("CreateFileInfos").addQueryParameter(
                "assetid", "'" + encodedId + "'");
    }
1270719
protected function addOrderBy()
    {
        if (static::$versionTransformer->isOrdered()) {
            foreach (static::$versionTransformer->getOrderedColumns() as $index => $direction) {
                if (isset($this->columnNames[$index])) {
                    $this->builder->orderBy(
                        $this->columnNames[$index],
                        $direction
                    );
                }
            }
        }
    }
282872
@Override
	public <T> T getOrDefine(final String key, final T defaultValue, DomainResolver resolver) {
		return getOrDefine(key, defaultValue, resolver, null);
	}
72254
public OrderingType<WebFragmentDescriptor> getOrCreateOrdering()
   {
      List<Node> nodeList = model.get("ordering");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new OrderingTypeImpl<WebFragmentDescriptor>(this, "ordering", model, nodeList.get(0));
      }
      return createOrdering();
   }
854455
public void order() {
        final OrderComparator comparator = new OrderComparator();
        for (Class<? extends FeatureInstaller> installer : installerTypes) {
            if (Ordered.class.isAssignableFrom(installer)) {
                final List<Class<?>> extensions = this.extensions.get(installer);
                if (extensions == null || extensions.size() <= 1) {
                    continue;
                }
                extensions.sort(comparator);
            }
        }
    }