Class AnnotationBatcher.CurrentAnnotationInfo

  • All Implemented Interfaces:
    LoggableData
    Enclosing class:
    AnnotationBatcher

    public static class AnnotationBatcher.CurrentAnnotationInfo
    extends Object
    implements LoggableData
    Holds information about an annotation for the current item. We pre-initialize one instance for each registered annotation type. In the setCurrentItem() method we update the instances with information about current annotations. Before using an entry we must always check if itemId==currentItem.id. If the IDs don't match the entry is for a previous item and the current item doesn't have any annotation for the annotation type. The 'hasBeenUsed' flag is set to prevent calling the setValues() method more than once for each annotation type. This class exposes some information publicly since it is used for change history logging. See AnnotationLogger.
    • Field Detail

      • valueType

        final Type valueType
      • defaultUnit

        final Unit defaultUnit
      • itemType

        final Item itemType
      • useProjectAnnotations

        final boolean useProjectAnnotations
      • itemId

        int itemId
      • hasBeenUsed

        boolean hasBeenUsed
      • annotationId

        Integer annotationId
      • version

        int version
      • valueId

        int valueId
      • lastUpdated

        Date lastUpdated
      • projectId

        int projectId
      • overrideId

        int overrideId
      • newValues

        List<?> newValues
    • Constructor Detail

    • Method Detail

      • getAnnotationType

        public AnnotationType getAnnotationType()
        Get the annotation type.
      • getItemType

        public Item getItemType()
        Get the item type of the item.
      • getItemId

        public int getItemId()
        Get the id of the current item.
      • getUnitId

        public Integer getUnitId()
        Get the ID of the unit this annotation is using.
      • getOldValues

        public List<?> getOldValues()
        Get the old annotation values. If the annotation uses units, the values are always in the default unit specified by the annotation type.
      • getNewValues

        public List<?> getNewValues()
        Get the new annotation values. If the annotation uses units, the values are always in the default unit specified by the annotation type.