Package liquibase

Class LabelExpression

  • public class LabelExpression
    extends Object
    Wrapper for list of labels.

    Labels are tags that you can add to changesets to control which changeset will be executed in any migration run. Labels control whether a changeset is executed depending on runtime settings. Any string can be used for the label name, and it is case-insensitive.

    See Also:
    labels in documentation
    • Constructor Detail

      • LabelExpression

        public LabelExpression()
      • LabelExpression

        public LabelExpression​(String... labels)
      • LabelExpression

        public LabelExpression​(String labels)
    • Method Detail

      • add

        public boolean add​(String label)
      • matches

        public boolean matches​(Labels runtimeLabels)
        Returns true if the passed runtime labels match this label expression
      • matchesAll

        public static boolean matchesAll​(Collection<Labels> changesetLabels,
                                         LabelExpression labelExpression)
        Return true if all the LabelExpression objects match the runtime
        changesetLabels - Expressions to match against
        labelExpression - Runtime labels
        boolean True if match
      • isEmpty

        public boolean isEmpty()
      • getOriginalString

        public String getOriginalString()