protected function _loadDBSecurityGroupData(\SimpleXMLElement $sxml)
{
$item = null;
if ($this->exist($sxml)) {
$dbSecurityGroupName = (string) $sxml->DBSecurityGroupName;
$item = $this->rds->getEntityManagerEnabled() ? $this->rds->dbSecurityGroup->get($dbSecurityGroupName) : null;
if ($item === null) {
$item = new DBSecurityGroupData();
$item->setRds($this->rds);
$bAttach = true;
} else {
$item->resetObject();
$bAttach = false;
}
$item->dBSecurityGroupName = $dbSecurityGroupName;
$item->dBSecurityGroupDescription = $this->exist($sxml->DBSecurityGroupDescription) ? (string) $sxml->DBSecurityGroupDescription : null;
$item->ownerId = $this->exist($sxml->OwnerId) ? (string) $sxml->OwnerId : null;
$item->vpcId = $this->exist($sxml->VpcId) ? (string) $sxml->VpcId : null;
$item->eC2SecurityGroups = $this->_loadEC2SecurityGroupList($sxml->EC2SecurityGroups);
$item->iPRanges = $this->_loadIPRangeList($sxml->IPRanges);
if ($bAttach && $this->rds->getEntityManagerEnabled()) {
$this->getEntityManager()->attach($item);
}
}
return $item;
}