Class Constraint

    • Constructor Detail

      • Constraint

        public Constraint​(String name,
                          io.github.mmm.value.PropertyPath<?> column)
        The constructor.
        Parameters:
        name - the name.
        column - the (first) column.
    • Method Detail

      • getName

        public String getName()
        Returns:
        the name of the predicate (e.g. "FK_Person_Order").
      • getType

        public abstract String getType()
        Returns:
        the type of this Constraint (e.g. "CHECK" or "FOREIGN KEY").
      • getColumns

        public List<io.github.mmm.value.PropertyPath<?>> getColumns()
        Returns:
        the List with the properties representing the columns this Constraint applies to.
      • createName

        protected static final String createName​(String prefix,
                                                 io.github.mmm.property.ReadableProperty<?> property)
        Parameters:
        prefix - the constraint prefix (XX_).
        property - the ReadableProperty representing the column.
        Returns:
        the Constraint name.
      • createName

        protected static final String createName​(String prefix,
                                                 io.github.mmm.property.ReadableProperty<?> property,
                                                 boolean addProperty)
        Parameters:
        prefix - the constraint prefix (XX_).
        property - the ReadableProperty representing the column.
        addProperty - - true to add the property path, false otherwise.
        Returns:
        the Constraint name.