Class FieldDefinition

    • Constructor Summary

      Constructors 
      Constructor Description
      FieldDefinition()


      Constructs a new unnamed field definition with the default base type of STRING.
      FieldDefinition​(java.lang.String name, BaseTypes baseType)


      Constructs a new field definition with the specified name and base type.
      FieldDefinition​(java.lang.String name, BaseTypes baseType, AspectCollection aspects)


      Constructs a new field definition with the specified name, base type, and aspects.
      FieldDefinition​(java.lang.String name, java.lang.String description)


      Constructs a new field definition with the specified name and description.
      FieldDefinition​(java.lang.String name, java.lang.String description, BaseTypes baseType)


      Constructs a new field definition with the specified name, description, and base type.
      FieldDefinition​(java.lang.String name, java.lang.String description, BaseTypes baseType, AspectCollection aspects)


      Constructs a new field definition with the specified name, description, base type, and aspects.
    • Constructor Detail

      • FieldDefinition

        @ThingworxExtensionApiMethod(since={6,6})
        public FieldDefinition()


        Constructs a new unnamed field definition with the default base type of STRING.
      • FieldDefinition

        @ThingworxExtensionApiMethod(since={6,6})
        public FieldDefinition​(java.lang.String name,
                               java.lang.String description)


        Constructs a new field definition with the specified name and description. The base type will be set to the default of STRING.
        Parameters:
        name - the name
        description - the description
      • FieldDefinition

        @ThingworxExtensionApiMethod(since={6,6})
        public FieldDefinition​(java.lang.String name,
                               java.lang.String description,
                               BaseTypes baseType)


        Constructs a new field definition with the specified name, description, and base type. If the supplied base type is null, the default of STRING will be used.
        Parameters:
        name - the name
        description - the description
        baseType - the base type
      • FieldDefinition

        @ThingworxExtensionApiMethod(since={7,1})
        public FieldDefinition​(java.lang.String name,
                               BaseTypes baseType,
                               AspectCollection aspects)


        Constructs a new field definition with the specified name, base type, and aspects. If the supplied base type is null, the default of STRING will be used.
        Parameters:
        name - the name
        baseType - the base type
        aspects - a collection of aspects belonging to this field
      • FieldDefinition

        @ThingworxExtensionApiMethod(since={7,1})
        public FieldDefinition​(java.lang.String name,
                               java.lang.String description,
                               BaseTypes baseType,
                               AspectCollection aspects)


        Constructs a new field definition with the specified name, description, base type, and aspects. If the supplied base type is null, the default of STRING will be used.
        Parameters:
        name - the name
        description - the description
        baseType - the base type
        aspects - a collection of aspects belonging to this field
      • FieldDefinition

        @ThingworxExtensionApiMethod(since={6,6})
        public FieldDefinition​(java.lang.String name,
                               BaseTypes baseType)


        Constructs a new field definition with the specified name and base type. If the supplied base type is null, the default of STRING will be used.
        Parameters:
        name - the name
        baseType - the base type
    • Method Detail

      • setBaseType

        @ThingworxExtensionApiMethod(since={6,6})
        public void setBaseType​(BaseTypes baseType)


        Assigns the specified base type to this field. Any persisted data that refers to this field may not be accessible if the base type is changed to an incompatible type. If the supplied value is null, this will perform a no-op.
        Parameters:
        baseType - the base type to assign to this field
      • getOrdinal

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.Integer getOrdinal()


        Returns the ordinal value assigned to this field.
        Returns:
        the ordinal value
      • setOrdinal

        @ThingworxExtensionApiMethod(since={6,6})
        public void setOrdinal​(java.lang.Integer ordinal)


        Sets the ordinal value for this field. If the supplied value is null, this will perform a no-op.
        Parameters:
        ordinal - the new ordinal value
      • setAspects

        @ThingworxExtensionApiMethod(since={6,6})
        public void setAspects​(AspectCollection value)


        Replaces all aspects on this field with the aspects in the specified collection.
        Parameters:
        value - the aspects that will be assigned to this field
      • aspectsMatch

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean aspectsMatch​(AspectCollection aspects)


        Determines whether or not the aspects assigned to this field are equivalent to the aspects in the provided collection.
        Parameters:
        aspects - a collection of aspects to compare against
        Returns:
        true if the aspects are equivalent
      • hasDataShape

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean hasDataShape()


        Determines if, when the base type of this field is an INFOTABLE, a data shape has been assigned.
        Returns:
        true if the base type is set to INFOTABLE and a value is set to the ASPECT_DATASHAPE aspect
      • isStreamEntry

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean isStreamEntry()


        Determines if, when the base type of this field is an INFOTABLE, the contents of the info table will be derived from a stream entry.
        Returns:
        true if the base type is set to INFOTABLE and the ASPECT_ISSTREAMENTRY aspect is set to true
      • isDataTableEntry

        @ThingworxExtensionApiMethod(since={6,6})
        public boolean isDataTableEntry()


        Determines if, when the base type of this field is an INFOTABLE, the contents of the info table will be derived from a data table entry.
        Returns:
        true if the base type is set to INFOTABLE and the ASPECT_ISDATATABLEENTRY aspect is set to true
      • isContentCrawlerEntry

        @ThingworxExtensionApiMethod(since={8,0})
        public boolean isContentCrawlerEntry()


        Determines if, when the base type of this field is an INFOTABLE, the contents of the info table will be derived from a content crawler entry.
        Returns:
        true if the base type is set to INFOTABLE and the ASPECT_ISCONTENTCRAWLERENTRY aspect is set to true
      • getDataShapeName

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String getDataShapeName()


        Returns the data shape name assigned to the ASPECT_DATASHAPE aspect, if the base type for this field is set to INFOTABLE.
        Returns:
        the data shape name assigned to this field if the base type is set to INFOTABLE, or null if no data shape name has been assigned or the base type is not INFOTABLE