Package org.h2.schema

Class Domain

    • Constructor Detail

      • Domain

        public Domain​(Schema schema,
                      int id,
                      java.lang.String name)
    • Method Detail

      • getCreateSQLForCopy

        public java.lang.String getCreateSQLForCopy​(Table table,
                                                    java.lang.String quotedName)
        Description copied from class: DbObject
        Build a SQL statement to re-create the object, or to create a copy of the object with a different name or referencing a different table
        Specified by:
        getCreateSQLForCopy in class DbObject
        Parameters:
        table - the new table
        quotedName - the quoted name
        Returns:
        the SQL statement
      • getDropSQL

        public java.lang.String getDropSQL()
        Description copied from class: DbObject
        Construct a DROP ... SQL statement for this object.
        Overrides:
        getDropSQL in class DbObject
        Returns:
        the SQL statement
      • getCreateSQL

        public java.lang.String getCreateSQL()
        Description copied from class: DbObject
        Construct the CREATE ... SQL statement for this object.
        Specified by:
        getCreateSQL in class DbObject
        Returns:
        the SQL statement
      • setDataType

        public void setDataType​(TypeInfo type)
      • getDataType

        public TypeInfo getDataType()
      • addConstraint

        public void addConstraint​(ConstraintDomain constraint)
        Add a constraint to the domain.
        Parameters:
        constraint - the constraint to add
      • getConstraints

        public java.util.ArrayList<ConstraintDomain> getConstraints()
      • removeConstraint

        public void removeConstraint​(Constraint constraint)
        Remove the given constraint from the list.
        Parameters:
        constraint - the constraint to remove
      • getType

        public int getType()
        Description copied from class: DbObject
        Get the object type.
        Specified by:
        getType in class DbObject
        Returns:
        the object type
      • removeChildrenAndResources

        public void removeChildrenAndResources​(SessionLocal session)
        Description copied from class: DbObject
        Delete all dependent children objects and resources of this object.
        Specified by:
        removeChildrenAndResources in class DbObject
        Parameters:
        session - the session
      • checkConstraints

        public void checkConstraints​(SessionLocal session,
                                     Value value)
        Check the specified value.
        Parameters:
        session - the session
        value - the value