This implementation checks for the {@link Order} annotation
on various kinds of elements, in addition to the
{@link com.freetmp.common.core.Ordered} check in the superclass.
501682
protected Integer findOrder(Object obj) {
		// Check for regular Ordered interface
		Integer order = super.findOrder(obj);
		if (order != null) {
			return order;
		}

		// Check for @Order annotation on various kinds of elements
		if (obj instanceof Class) {
			return OrderUtils.getOrder((Class) obj);
		}
		else if (obj instanceof Method) {
			Order ann = AnnotationUtils.findAnnotation((Method) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj instanceof AnnotatedElement) {
			Order ann = AnnotationUtils.getAnnotation((AnnotatedElement) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj != null) {
			return OrderUtils.getOrder(obj.getClass());
		}

		return null;
	}
1153579
boolean contains(WriteOrder<?> e) {
    return (e.getPreviousInWriteOrder() != null)
        || (e.getNextInWriteOrder() != null)
        || (e == first);
  }
387509
private boolean equalsIgnoreOrder(final ConstructorDef<?> def) {
    HashMap map = new HashMap();
    for (ConstructorArg a : def.getArgs()) {
      map.put(a.getName(), null);
    }
    for (ConstructorArg a : getArgs()) {
      if (!map.containsKey(a.getName())) {
        return false;
      }
    }
    return true;
  }
942859
private boolean checkValidClass(Class<?> clazz) {
        return clazz.isAnnotationPresent(Entity.class) || clazz.isAnnotationPresent(MappedSuperclass.class)
            || clazz.isAnnotationPresent(Embeddable.class);

    }
267295
public static <ElementType> Ordering<Multiset.Entry<ElementType>> byCountOrdering() {
    return Ordering.natural().onResultOf(MultisetUtils.<ElementType>toCountFunction());
  }
1311101
public static boolean isAnnotated(AnnotatedElement element, Class<? extends Annotation> annotationType) {
        return findAnnotation(element, annotationType) != null;
    }
233712
static <K extends Comparable<K>> void checkNode(Node<K> node) {
        node.checkNode(null, null);
    }
361884
private boolean checkAnnotations(List<? extends AnnotationTree> annotations, Tree node) {
    for (AnnotationTree annotation : annotations) {
      if (isJ2ObjCIncompatible(annotation)) {
        nodesToStrip.add(node);
        return false;
      }
    }
    return true;
  }
1178602
public boolean isDocumentedAnnotation(TypeElement annotation) {
        for (AnnotationMirror anno : annotation.getAnnotationMirrors()) {
            if (getFullyQualifiedName(anno.getAnnotationType().asElement()).equals(
                    Documented.class.getName())) {
                return true;
            }
        }
        return false;
    }
980671
@NonNull
    @Override
    public OrderBy orderBy(@NonNull Ordering... orderings) {
        if (orderings == null) {
            throw new IllegalArgumentException("orderings is null.");
        }
        return new OrderBy(this, Arrays.asList(orderings));
    }
1060770
public void setOrdering(String ordering) {

        if (ordering != null) {
            m_ordering = new CmsSimpleQueryFragment(ordering, Collections.<Object> emptyList());
        } else {
            m_ordering = null;
        }
    }
1035858
public boolean isOrderingRequired() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, "isOrderingRequired", this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, "isOrderingRequired", Boolean.valueOf(_isOrderingRequired));
        }

        return _isOrderingRequired;
    }
739065
@Override
    public boolean isOrdered() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isOrdered");

        boolean returnValue = getTarget().isOrdered();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isOrdered", Boolean.valueOf(returnValue));

        return returnValue;
    }
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;
	}
231368
public static Ordering definedBy(
            Ordering.Factory factory, Description annotatedTestClass)
            throws InvalidOrderingException {
        if (factory == null) {
            throw new NullPointerException("factory cannot be null");
        }
        if (annotatedTestClass == null) {
            throw new NullPointerException("annotatedTestClass cannot be null");
        }

        return factory.create(new Ordering.Context(annotatedTestClass));
    }
740003
public Order ORDER(DomainObjectMatch<?> toOrder) {
		DomainObjectMatch<?> delegate = APIAccess.getDelegate(toOrder);
		DomainObjectMatch<?> match = delegate != null ? delegate : toOrder;
		OrderExpression oe = this.queryExecutor.getOrderFor(match);
		Order ret = APIAccess.createOrder(oe);
		QueryRecorder.recordInvocation(this, "ORDER", ret, QueryRecorder.placeHolder(match));
		return ret;
	}
1363987
public boolean inOrder() {
        SortedSet<Integer> prev = null;
        for (SortedSet<Integer> cell : cells) {
            if (prev == null) {
                prev = cell;
            } else {
                int first = cell.first();
                int last = cell.last();
                if (first > prev.first() && last > prev.last()) {
                    prev = cell;
                } else {
                    return false;
                }
            }
        }
        return true;
    }