Package javax.persistence

Examples of javax.persistence.OrderBy


    if (joinColumnsAnn != null)
      introspectJoinColumns(joinColumnsAnn.value());
    else if (joinColumnAnn != null)
      introspectJoinColumns(new JoinColumn[] { joinColumnAnn });
   
    OrderBy orderByAnn = _field.getAnnotation(OrderBy.class);
   
    if (orderByAnn != null)
      _orderBy = orderByAnn.value();
  }
View Full Code Here


    ManyToMany manyToMany = get(prop, ManyToMany.class);
    if (manyToMany != null) {
      readToMany(manyToMany, prop);
    }

    OrderBy orderBy = get(prop, OrderBy.class);
    if (orderBy != null) {
      prop.setFetchOrderBy(orderBy.value());
    }

    MapKey mapKey = get(prop, MapKey.class);
    if (mapKey != null) {
      prop.setMapKey(mapKey.name());
View Full Code Here

                    Type[] types = type.getActualTypeArguments();
                    Class typeInList = (Class) types[0];
                    // todo: should this return null if there are no elements??
//                    LazyList lazyList = new LazyList(this, newInstance, annotation.mappedBy(), id, typeInList, factory.getAnnotationManager().getAnnotationInfo(typeInList));
                   
                    OrderBy orderBy = null;
                    if (type.getRawType() == List.class)
                    {
                        orderBy = getter.getAnnotation(OrderBy.class);
                    }
                   
View Full Code Here

    {

        String[] orderByColumns = null;
        if (field.isAnnotationPresent(OrderBy.class))
        {
            OrderBy order = (OrderBy) field.getAnnotation(OrderBy.class);
            orderByColumns = order.value().split("\\s*,\\s*");
        }
        EmbeddedColumnInfo embeddedColumnInfo = new EmbeddedColumnInfo(embeddableType);
        embeddedColumnInfo.setEmbeddedColumnName(embeddableColName);
        Map<String, PropertyIndex> indexedColumns = IndexProcessor.getIndexesOnEmbeddable(embeddedEntityClass);
        List<ColumnInfo> columns = new ArrayList<ColumnInfo>();
View Full Code Here

    {
        ColumnInfo columnInfo = new ColumnInfo();

        if (column.getJavaType().isAnnotationPresent(OrderBy.class))
        {
            OrderBy order = (OrderBy) column.getJavaType().getAnnotation(OrderBy.class);
            orderByColumns = order.value().split("\\s*,\\s*");

        }
        columnInfo.setOrderBy(getOrderByColumn(orderByColumns, column));

        if (column.getJavaType().isEnum())
View Full Code Here

    if (joinColumnsAnn != null)
      introspectJoinColumns(joinColumnsAnn.value());
    else if (joinColumnAnn != null)
      introspectJoinColumns(new JoinColumn[] { joinColumnAnn });
   
    OrderBy orderByAnn = _field.getAnnotation(OrderBy.class);
   
    if (orderByAnn != null)
      _orderBy = orderByAnn.value();
  }
View Full Code Here

        }
        else {
            name = columnAnnotation.name();
        }
       
        OrderBy orderByAnnotation = field.getAnnotation(OrderBy.class);
        if (orderByAnnotation == null) {
            reversed = false;
        }
        else {
            Order order = Order.valueOf(orderByAnnotation.value());
            reversed = (order == Order.DESC);
        }
    }
View Full Code Here

TOP

Related Classes of javax.persistence.OrderBy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.