Enum TypeProjection.Source

  • All Implemented Interfaces:
    Serializable, Comparable<TypeProjection.Source>
    Enclosing interface:
    TypeProjection

    public static enum TypeProjection.Source
    extends Enum<TypeProjection.Source>
    Whether a TypeProjection was computed by the auto-generation algorithm, defined by an admin, or is the minimal safety-net fallback used when the full auto-generation computation itself fails. A closed, 3-value set — modeled as a real enum rather than String constants for compile-time safety (unlike most other @ISProperty string fields in this model, which hold open-ended values such as a Type name, and are therefore correctly plain Strings). FALLBACK is deliberately a third value of this same enum rather than an orthogonal boolean flag: it can only ever occur as a sub-case of AUTO_GENERATED (a CUSTOM projection is validated at submission time and rejected outright on failure, never silently degraded), so a separate flag would make an impossible combination — CUSTOM + "degraded" — representable for no reason. toString() and fromString(String) keep the wire value the hyphenated form already in use (e.g. "auto-generated") rather than the Java constant name Jackson would otherwise default to.
    • Enum Constant Detail

      • AUTO_GENERATED

        public static final TypeProjection.Source AUTO_GENERATED
        Computed by the auto-generation algorithm from the owning Type's schema.
      • CUSTOM

        public static final TypeProjection.Source CUSTOM
        Defined by an admin via PUT /types/{type-name}/projection.
      • FALLBACK

        public static final TypeProjection.Source FALLBACK
        The minimal, always-valid baseline (id + effective type only), persisted in place of the intended auto-generated default when computing the latter threw or otherwise failed — a safety net so a bug in the generation algorithm never blocks the Type create/update that triggered it.
    • Method Detail

      • values

        public static TypeProjection.Source[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TypeProjection.Source c : TypeProjection.Source.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TypeProjection.Source valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null