Interface ModelRef

All Known Implementing Classes:
ModelRef.Custom, ModelRef.Entity

public sealed interface ModelRef permits ModelRef.Entity, ModelRef.Custom
A model a tool acts on: an entity, or a custom model whose records are MetaJsonRecord.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Set<String>
    What the platform records on every record, which says nothing about what the model holds: a restriction holds one back only by naming it, never by its other fields.
    static final Set<String>
    Every record's identity: readable by whoever may read the record, and never restricted.
  • Method Summary

    Modifier and Type
    Method
    Description
    How a refusal names the model: an entity's simple name, a custom model's name.
    The model as permissions name it: an entity's full name, a custom model's name.
    static ModelRef
    named(String name)
    The model of this name(): an entity's full name, else a custom model's name; null when it names neither.
    static ModelRef
    of(MetaJsonModel custom)
     
    static ModelRef
    The model the query engine resolved, or null for a custom model that no longer exists.
    static ModelRef
    of(Class<? extends Model> entity)
     
    Class<? extends Model>
    The entity the records are stored in, which the platform's model permissions name.
    static ModelRef
    The model a custom relational field refers to: a custom model, else an entity; null for a field that refers to none.
  • Field Details

    • RECORD_FIELDS

      static final Set<String> RECORD_FIELDS
      Every record's identity: readable by whoever may read the record, and never restricted.
    • AUDIT_FIELDS

      static final Set<String> AUDIT_FIELDS
      What the platform records on every record, which says nothing about what the model holds: a restriction holds one back only by naming it, never by its other fields.
  • Method Details

    • storage

      Class<? extends Model> storage()
      The entity the records are stored in, which the platform's model permissions name.
    • name

      String name()
      The model as permissions name it: an entity's full name, a custom model's name.
    • displayName

      String displayName()
      How a refusal names the model: an entity's simple name, a custom model's name.
    • of

      static ModelRef of(Class<? extends Model> entity)
    • of

      static ModelRef of(MetaJsonModel custom)
    • named

      static ModelRef named(String name)
      The model of this name(): an entity's full name, else a custom model's name; null when it names neither.
    • target

      static ModelRef target(MetaJsonField field)
      The model a custom relational field refers to: a custom model, else an entity; null for a field that refers to none.
    • of

      static ModelRef of(ResolvedModel model)
      The model the query engine resolved, or null for a custom model that no longer exists.