<?php

/**
 * Subclass for representing a row from the 'katao_member_group' table.
 *
 *
 *
 * @package lib.model
 */
class KataoMemberGroup extends BaseKataoMemberGroup
{
	public function executeIndex(){

	}

	public function __toString(){
		return $this->getKataoMemberGroupName();
	}

	public function isDeletable() {
		if($this->countKataoMemberGroups()==0){
			return false;
		}else{
			return true;
		}
	}

	public function countKataoMemberGroups($criteria = null, $distinct = false, $con = null)
	{
		// include the Peer class
		if ($criteria === null) {
			$criteria = new Criteria();
		}
		elseif ($criteria instanceof Criteria)
		{
			$criteria = clone $criteria;
		}

		$criteria->add(KataoMemberGroupPeer::ID, $this->getId());

		return KataoMemberGroupPeer::doCount($criteria, $distinct, $con);
	}
}
