Class RowDetails

java.lang.Object
org.apache.juneau.petstore.console.pages.RowDetails

public final class RowDetails extends Object
The expandable row details of the console tables, shared by the page builders (which only need the declaration) and the resources that serve them (which pass a real lookup).

A bean-backed detail lists its fields explicitly, so the resource that serves it never depends on having been attached to a table. Each field list equals the columns of the table it opens from, hidden ones included.

Example:

// A page builder attaches the declaration; the resource serves it with a store lookup. TableSpec.create("orders").detail(RowDetails.order());

  • Method Details

    • pet

      public static RowDetail pet()
      Returns:
      The Pets table detail, for building a page.
    • pet

      public static RowDetail pet(Function<String,Pet> lookup)
      The Pets table detail: Details, this pet's orders and its history.
      Parameters:
      lookup - Finds a pet by row id, or returns null.
      Returns:
      A new detail.
    • soldPet

      public static RowDetail soldPet()
      Returns:
      The Sold table detail, for building a page.
    • soldPet

      public static RowDetail soldPet(Function<String,Pet> lookup)
      The Sold table detail: the columns that table shows, and this pet's orders.
      Parameters:
      lookup - Finds a pet by row id, or returns null.
      Returns:
      A new detail.
    • order

      public static RowDetail order()
      Returns:
      The Orders and Store tables' detail, for building a page.
    • order

      public static RowDetail order(Function<String,Order> lookup)
      The Orders and Store recent-orders detail: Details and the ordered pet.
      Parameters:
      lookup - Finds an order by row id, or returns null.
      Returns:
      A new detail.
    • user

      public static RowDetail user()
      Returns:
      The Users table detail, for building a page.
    • user

      public static RowDetail user(Function<String,UsersRest.UserView> lookup)
      The Users table detail: Details and the orders this user placed. It serves UserView, so a password, email or phone never leaves the server.
      Parameters:
      lookup - Finds a user by row id (the username), or returns null.
      Returns:
      A new detail.
    • change

      public static RowDetail change()
      Returns:
      The Pending changes table detail.
    • audit

      public static RowDetail audit()
      Returns:
      The Audit table detail.
    • history

      public static RowDetail history()
      Returns:
      The pet History table detail.