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;
    }
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 ; }
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}.