Class LocationQuery.LocationOrder

  • Enclosing class:
    LocationQuery

    public class LocationQuery.LocationOrder
    extends Object

    Orders the results of the query.

    API:
    This is a public API.
    • Method Detail

      • timestamp

        public LocationQuery.LocationOrder.OrderDirection timestamp()

        Orders the results by the timestamp.

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> locations = ivy.session.getSessionUser().locations().search().orderBy().timestamp().ascending().findAll();
         
        Returns:
        order direction
        See Also:
        ILocation.getTimestamp()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • name

        public LocationQuery.LocationOrder.OrderDirection name()

        Orders the results by the name.

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> locations = ivy.session.getSessionUser().locations().search().orderBy().name().ascending().findAll();
         
        Returns:
        order direction
        See Also:
        ILocation.getName()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • type

        public LocationQuery.LocationOrder.OrderDirection type()

        Orders the results by the type.

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> locations = ivy.session.getSessionUser().locations().search().orderBy().type().ascending().findAll();
         
        Returns:
        order direction
        See Also:
        ILocation.getType(), ILocation.Type
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • address

        public LocationQuery.LocationOrder.OrderDirection address()

        Orders the results by the address

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> locations = ivy.session.getSessionUser().locations().search().orderBy().address().ascending().findAll();
         
        Returns:
        order direction
        See Also:
        ILocation.getAddress()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • note

        public LocationQuery.LocationOrder.OrderDirection note()

        Orders the results by the note.

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> locations = ivy.session.getSessionUser().locations().search().orderBy().note().ascending().findAll();
         
        Returns:
        order direction
        See Also:
        ILocation.getNote()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • findFirst

        public ILocation findFirst()

        Finds a location that matches the filter criteria and is at top position in the order specified with LocationQuery.orderBy().

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         ILocation location = ivy.session.getSessionUser().locations().search().orderBy().name().ascending().findFirst();
         
        Returns:
        first location that matches the filter criteria in the specified order. Null if no location matches the filter.
        See Also:
        findAll()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • findAll

        public List<ILocation> findAll()

        Finds all locations that match the filter criteria. The list is ordered as specified with LocationQuery.orderBy().

        Example:

         
         import ch.ivyteam.ivy.location.ILocation;
         List<ILocation> allLocations = ivy.session.getSessionUser().locations().search().orderBy().timestamp().descending().findAll();
         
        Returns:
        all locations that match the filter criteria in the specified order
        See Also:
        findFirst()
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.