Class PropertiesOptions

java.lang.Object
org.brapi.schematools.core.options.PropertiesOptions
All Implemented Interfaces:
Options, Validatable

public class PropertiesOptions extends Object implements Options
Provides options for the generation of ID, Name and PUI property and their usage
  • Constructor Details

    • PropertiesOptions

      public PropertiesOptions()
  • Method Details

    • validate

      public Validation validate()
      Description copied from interface: Validatable
      Checks if the Validatable object is valid, return a list of errors if it is not valid
      Specified by:
      validate in interface Validatable
      Returns:
      a Validation object than can be used queried to find if the object is valid and any errors if it is not valid
    • override

      public void override(PropertiesOptions overrideOptions)
      Overrides the values in this Options Object from the provided Options Object if they are non-null
      Parameters:
      overrideOptions - the options which will be used to override this Options Object
    • getLinkPropertiesFor

      public List<BrAPIObjectProperty> getLinkPropertiesFor(BrAPIObjectType brAPIObjectType)
      Gets the list of link properties that are used to generate links to the provided object type. This is usually the object dbId, but can also be the name and/or PUI.
      Parameters:
      brAPIObjectType - the object type from which the properties will be obtained
      Returns:
      list of link properties that are used to generate links to the object
    • getIdPropertyNameFor

      public String getIdPropertyNameFor(String type)
      Gets the id property name for a type
      Parameters:
      type - The BrAPI type
      Returns:
      the id property name for a type
    • getIdPropertyNameFor

      public String getIdPropertyNameFor(BrAPIType type)
      Gets the id property name for a type
      Parameters:
      type - The BrAPI type
      Returns:
      the id property name for a type
    • getIdsPropertyNameFor

      public String getIdsPropertyNameFor(BrAPIObjectProperty property)
      Gets the converted ids link property name for a property
      Parameters:
      property - The BrAPI property
      Returns:
      the converted property name that is used to return an array of ids
    • getIdPropertyFor

      public Response<BrAPIObjectProperty> getIdPropertyFor(BrAPIType type)
      Gets the id property for a type
      Parameters:
      type - The BrAPI type
      Returns:
      the id property for a type
    • getLinkTypeFor

      public LinkType getLinkTypeFor(BrAPIObjectType type, BrAPIObjectProperty property)
      Gets the link type for a type property
      Parameters:
      type - The BrAPI Object type
      property - The BrAPI property
      Returns:
      the link type for specified type property