Class OrderByMetadata


  • public class OrderByMetadata
    extends ORMetadata
    Object to hold onto order by metadata. Key notes: - any metadata mapped from XML to this class must be compared in the equals method. - when loading from annotations, the constructor accepts the metadata accessor this metadata was loaded from. Used it to look up any 'companion' annotation needed for processing. - methods should be preserved in alphabetical order.
    Since:
    EclipseLink 2.3
    Author:
    Guy Pelletier
    • Constructor Detail

      • OrderByMetadata

        public OrderByMetadata()
        INTERNAL: Used for XML loading.
    • Method Detail

      • equals

        public boolean equals​(Object objectToCompare)
        INTERNAL:
        Specified by:
        equals in class ORMetadata
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getValue

        public String getValue()
        INTERNAL: Used for OX mapping.
      • process

        public void process​(CollectionMapping mapping,
                            MetadataDescriptor referenceDescriptor,
                            MetadataClass javaClass)
        INTERNAL: Process an order by value (if specified) for the given collection mapping. Order by specifies the ordering of the elements of a collection valued association at the point when the association is retrieved. The syntax of the value ordering element is an orderby_list, as follows: orderby_list ::= orderby_item [, orderby_item]* orderby_item ::= property_or_field_name [ASC | DESC] When ASC or DESC is not specified, ASC is assumed. If the ordering element is not specified, ordering by the primary key of the associated entity is assumed. The property or field name must correspond to that of a persistent property or field of the associated class. The properties or fields used in the ordering must correspond to columns for which comparison operators are supported.
      • setValue

        public void setValue​(String value)
        INTERNAL: Used for OX mapping.