Class Constraint

    • Constructor Detail

      • Constraint

        protected Constraint​(ConstraintType type)
        Constructor
        Parameters:
        type - constraint type
      • Constraint

        protected Constraint​(ConstraintType type,
                             String name)
        Constructor
        Parameters:
        type - constraint type
        name - constraint name
      • Constraint

        protected Constraint​(ConstraintType type,
                             Integer order)
        Constructor
        Parameters:
        type - constraint type
        order - constraint order
      • Constraint

        protected Constraint​(ConstraintType type,
                             String name,
                             Integer order)
        Constructor
        Parameters:
        type - constraint type
        name - constraint name
        order - constraint order
    • Method Detail

      • getName

        public String getName()
        Get the name
        Returns:
        name or null
      • setName

        public void setName​(String name)
        Set the name
        Parameters:
        name - name
      • getType

        public ConstraintType getType()
        Get the constraint type
        Returns:
        constraint type
      • setType

        public void setType​(ConstraintType type)
        Set the constraint type
        Parameters:
        type - constraint type
      • getOrder

        public Integer getOrder()
        Get the order
        Returns:
        order number or null
        Since:
        5.0.0
      • setOrder

        public void setOrder​(Integer order)
        Set the order to a number or null
        Parameters:
        order - order number
        Since:
        5.0.0
      • buildNameSql

        protected String buildNameSql()
        Build the name SQL
        Returns:
        name SQL
      • buildSql

        public abstract String buildSql()
        Build the constraint SQL
        Returns:
        sql constraint
      • copy

        public abstract Constraint copy()
        Copy the constraint
        Returns:
        copied constraint