Class RawConstraint

  • All Implemented Interfaces:
    Comparable<Constraint>

    public class RawConstraint
    extends Constraint
    Table raw or unparsed constraint
    Since:
    3.3.0
    Author:
    osbornb
    • Constructor Detail

      • RawConstraint

        public RawConstraint​(String sql)
        Constructor
        Parameters:
        sql - constraint SQL
      • RawConstraint

        public RawConstraint​(ConstraintType type,
                             String sql)
        Constructor
        Parameters:
        type - constraint type
        sql - constraint SQL
      • RawConstraint

        public RawConstraint​(ConstraintType type,
                             String name,
                             String sql)
        Constructor
        Parameters:
        type - constraint type
        name - constraint name
        sql - constraint SQL
      • RawConstraint

        public RawConstraint​(Integer order,
                             String sql)
        Constructor
        Parameters:
        order - constraint order
        sql - constraint SQL
        Since:
        5.0.0
      • RawConstraint

        public RawConstraint​(ConstraintType type,
                             Integer order,
                             String sql)
        Constructor
        Parameters:
        type - constraint type
        order - constraint order
        sql - constraint SQL
        Since:
        5.0.0
      • RawConstraint

        public RawConstraint​(ConstraintType type,
                             String name,
                             Integer order,
                             String sql)
        Constructor
        Parameters:
        type - constraint type
        name - constraint name
        order - constraint order
        sql - constraint SQL
        Since:
        5.0.0
      • RawConstraint

        public RawConstraint​(RawConstraint userRawConstraint)
        Copy Constructor
        Parameters:
        userRawConstraint - user raw constraint
    • Method Detail

      • getSql

        public String getSql()
        Get the constraint SQL
        Returns:
        SQL
      • setSql

        public void setSql​(String sql)
        Set the constraint SQL
        Parameters:
        sql - constraint SQL
      • setTypeFromSql

        public void setTypeFromSql​(String sql)
        Set the type from the constraint SQL
        Parameters:
        sql - constraint SQL
      • setNameFromSql

        public void setNameFromSql​(String sql)
        Set the name from the constraint SQL
        Parameters:
        sql - constraint SQL
      • buildSql

        public String buildSql()
        Build the constraint SQL
        Specified by:
        buildSql in class Constraint
        Returns:
        sql constraint
      • copy

        public Constraint copy()
        Copy the constraint
        Specified by:
        copy in class Constraint
        Returns:
        copied constraint