Interface EntityExport.Attributes

Enclosing interface:
EntityExport

public static interface EntityExport.Attributes

The attributes to export, each one a column, in the order they are added.

An attribute of a referenced entity is added along with the foreign keys leading to it, its column header being their captions followed by its own, separated by a space, add(Invoice.CUSTOMER_FK, Customer.LASTNAME) for example, with the header "Customer Last name", unless a header is given. A foreign key added on its own exports the referenced entity as a string.

  • Method Details

    • add

      Adds an attribute to export.
      Parameters:
      path - the attribute, preceded by the foreign keys leading to it in case it belongs to a referenced entity
      Returns:
      this EntityExport.Attributes instance
      Throws:
      IllegalArgumentException - in case the path is empty, an attribute other than the last one is not a foreign key, or an attribute does not belong to the entity the preceding foreign key references, the first one to the entity being exported
    • add

      Adds an attribute to export.
      Parameters:
      path - the attribute, preceded by the foreign keys leading to it in case it belongs to a referenced entity
      Returns:
      this EntityExport.Attributes instance
      Throws:
      IllegalArgumentException - in case the path is empty, an attribute other than the last one is not a foreign key, or an attribute does not belong to the entity the preceding foreign key references, the first one to the entity being exported
    • add

      EntityExport.Attributes add(String header, Attribute<?>... path)
      Adds an attribute to export, with the given column header.
      Parameters:
      header - the column header
      path - the attribute, preceded by the foreign keys leading to it in case it belongs to a referenced entity
      Returns:
      this EntityExport.Attributes instance
      Throws:
      IllegalArgumentException - in case the path is empty, an attribute other than the last one is not a foreign key, or an attribute does not belong to the entity the preceding foreign key references, the first one to the entity being exported
    • add

      EntityExport.Attributes add(String header, List<Attribute<?>> path)
      Adds an attribute to export, with the given column header.
      Parameters:
      header - the column header
      path - the attribute, preceded by the foreign keys leading to it in case it belongs to a referenced entity
      Returns:
      this EntityExport.Attributes instance
      Throws:
      IllegalArgumentException - in case the path is empty, an attribute other than the last one is not a foreign key, or an attribute does not belong to the entity the preceding foreign key references, the first one to the entity being exported