Exemplo n.º 1
0
 /**
  * 
  * @param type $sModule
  * @param type $sType
  * @param type $sUUID
  * @return type
  */
 public function createEntity($sModule, $sType, $sUUID)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->createEntity($sModule, $sType, $sUUID))) {
         $bResult = $this->oConnection->GetLastInsertId();
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 2
0
 /**
  * @param CDomain &$oDomain
  * @return bool
  */
 public function CreateDomain(CDomain &$oDomain)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->CreateDomain($oDomain))) {
         $oDomain->IdDomain = $this->oConnection->GetLastInsertId('awm_domains', 'id_domain');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 3
0
 /**
  * @param CAccount $oAccount
  * @param CFetcher $oFetcher
  * @return bool
  */
 public function createFetcher($oAccount, &$oFetcher)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->createFetcher($oAccount, $oFetcher))) {
         $oFetcher->IdFetcher = $this->oConnection->GetLastInsertId('awm_fetchers', 'id_fetcher');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 4
0
 /**
  * @param CSubscription $oSubscription
  *
  * @return bool
  */
 public function createSubscription(&$oSubscription)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->createSubscription($oSubscription))) {
         $bResult = true;
         $oSubscription->IdSubscription = $this->oConnection->GetLastInsertId('awm_subscriptions', 'id_subscription');
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 5
0
 /**
  * @param CSocial &$oSocial
  * @return bool
  */
 public function CreateSocial(CSocial &$oSocial)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->CreateSocial($oSocial))) {
         $oSocial->Id = $this->oConnection->GetLastInsertId('awm_social', 'id');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 6
0
 /**
  * @param CGroup $oGroup
  * @return bool
  */
 public function createGroup($oGroup)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->createGroup($oGroup))) {
         $oGroup->IdGroup = $this->oConnection->GetLastInsertId('awm_addr_groups', 'id_group');
         $bResult = $this->updateGroup($oGroup);
     }
     return $bResult;
 }
Exemplo n.º 7
0
 /**
  * Creates calendar user in storage.
  * 
  * @param CCalUser &$oCalUser CCalUser object.
  * 
  * @return bool
  */
 public function createCalUser(CCalUser &$oCalUser)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->createCalUserQuery($oCalUser))) {
         $oCalUser->IdCalUser = $this->oConnection->GetLastInsertId('acal_users_data', 'settings_id');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 8
0
 /**
  * @param CHelpdeskUser $oHelpdeskUser
  * @param CHelpdeskPost $oPost
  *
  * @return bool
  */
 public function CreatePost(CHelpdeskUser $oHelpdeskUser, CHelpdeskPost &$oPost)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->CreatePost($oHelpdeskUser, $oPost))) {
         $oPost->IdHelpdeskPost = $this->oConnection->GetLastInsertId('ahd_posts', 'id_helpdesk_post');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 9
0
 /**
  * @param CTenant $oTenant
  */
 public function CreateTenant(CTenant &$oTenant)
 {
     $bResult = false;
     if ($this->oConnection->Execute($this->oCommandCreator->CreateTenant($oTenant))) {
         $bResult = true;
         $oTenant->IdTenant = $this->oConnection->GetLastInsertId('awm_tenants', 'id_tenant');
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }
Exemplo n.º 10
0
 /**
  * @param CAccount $oAccount
  * @param $sAuthType
  * @param $iDataType
  * @param $sDataValue
  * @return bool
  * @throws CApiBaseException
  */
 public function CreateAccount(\CAccount &$oAccount, $sAuthType, $iDataType, $sDataValue)
 {
     $bResult = false;
     $oObject = new CTwofactorauth();
     $oObject->AccountId = $oAccount->IdAccount;
     $oObject->AuthType = $sAuthType;
     $oObject->DataType = $iDataType;
     $oObject->DataValue = $sDataValue;
     if ($this->oConnection->Execute($this->oCommandCreator->CreateAccount($oObject))) {
         $oAccount->Id = $this->oConnection->GetLastInsertId('twofa_accounts', 'id');
         $bResult = true;
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }