protected function addClassBody(&$script)
    {

        $table = $this->getTable();

        if (!$table->isAlias()) {
            $this->addConstantsAndAttributes($script);
        }

        $this->addTranslateFieldName($script);
        $this->addGetFieldNames($script);

        if ($table->hasEnumColumns()) {
            $this->addGetValueSets($script);
            $this->addGetValueSet($script);
            $this->addGetSqlValueForEnum($script);
        }

        if (!$table->isAlias()) {
            $this->addAlias($script); // alias() utility method (deprecated?)
            $this->addSelectMethods($script);
            $this->addGetTableMap($script);
        }

        $this->addBuildTableMap($script);

        $this->addGetOMClassMethod($script);

        // add the insert, update, delete, validate etc. methods
        if (!$table->isAlias() && !$table->isReadOnly()) {
            $this->addUpdateMethods($script);
        }

        if (count($table->getPrimaryKey()) > 0) {
            $this->addRetrieveByPKMethods($script);
        }
    }