Class DbEntity

    • Constructor Detail

      • DbEntity

        protected DbEntity​(String name,
                           List<DbColumn> columns,
                           List<DbFk> fks,
                           List<String> pkFields,
                           List<DbIndex> indexes)
        Creates a new instance of DbEntity.
        Parameters:
        name - The name of the entity.
        columns - The column that compose the entity.
        fks - The list of foreign keys.
        pkFields - The list of fields that compose the primary key.
        indexes - The list of indexes in the entity.
    • Method Detail

      • getName

        public String getName()
        Gets the name of the entity.
        Returns:
        The name of the entity.
      • getColumns

        public List<DbColumn> getColumns()
        Gets the list of columns of the entity.
        Returns:
        The list of columns of the entity.
      • getFks

        public List<DbFk> getFks()
        Gets the immutable list of foreign keys.
        Returns:
        The immutable list of foreign keys.
      • getPkFields

        public List<String> getPkFields()
        Gets the immutable list of fields that compose the primary key.
        Returns:
        The immutable list of keys that compose the primary key.
      • getIndexes

        public List<DbIndex> getIndexes()
        Gets the immutable list of indexes.
        Returns:
        The immutable list of indexes.
      • containsColumn

        public boolean containsColumn​(String columnName)
        Checks if the given column is present in the list of columns.
        Parameters:
        columnName - The column name to check.
        Returns:
        true if the column is present in the list of columns, false otherwise.
      • newBuilder

        public DbEntity.Builder newBuilder()
        Returns a new builder out of the configuration.
        Returns:
        A new builder out of the configuration.