/// <summary>
        /// Construct
        /// </summary>
        /// <param name="coreDriver">Core Driver</param>
        /// <param name="management">Matadata management</param>
        /// <param name="id"></param>
        /// <param name="descp"></param>
        /// <param name="accNumber"></param>
        /// <param name="bankKey"></param>
        /// <param name="type"></param>
        /// <exception cref="ArgumentNullException">Arguments null</exception>
        /// <exception cref="MasterDataIdentityNotDefined">Master data identity is not defined.</exception>
        public BankAccountMasterData(CoreDriver coreDriver, MasterDataManagement management,
                MasterDataIdentity id, String descp, BankAccountNumber accNumber,
                MasterDataIdentity bankKey, BankAccountType type)
            : base(coreDriver, management, id, descp)
        {
            _accNumber = accNumber;
            _bankAccType = type;

            MasterDataBase bankKeyId = management.GetMasterData(bankKey,
                    MasterDataType.BANK_KEY);
            if (bankKeyId == null)
            {
                throw new MasterDataIdentityNotDefined(bankKey,
                        MasterDataType.BANK_KEY);
            }
            _bankKey = bankKeyId.GetIdentity();
        }
        /// <summary>
        /// Construct
        /// </summary>
        /// <param name="coreDriver">Core Driver</param>
        /// <param name="management">Matadata management</param>
        /// <param name="id"></param>
        /// <param name="descp"></param>
        /// <param name="accNumber"></param>
        /// <param name="bankKey"></param>
        /// <param name="type"></param>
        /// <exception cref="ArgumentNullException">Arguments null</exception>
        /// <exception cref="MasterDataIdentityNotDefined">Master data identity is not defined.</exception>
        public BankAccountMasterData(CoreDriver coreDriver, MasterDataManagement management,
                                     MasterDataIdentity id, String descp, BankAccountNumber accNumber,
                                     MasterDataIdentity bankKey, BankAccountType type)
            : base(coreDriver, management, id, descp)
        {
            _accNumber   = accNumber;
            _bankAccType = type;

            MasterDataBase bankKeyId = management.GetMasterData(bankKey,
                                                                MasterDataType.BANK_KEY);

            if (bankKeyId == null)
            {
                throw new MasterDataIdentityNotDefined(bankKey,
                                                       MasterDataType.BANK_KEY);
            }
            _bankKey = bankKeyId.GetIdentity();
        }
        /// <summary>
        /// set bank key
        /// </summary>
        /// <param name="bankKey"></param>
        /// <exception cref="ArgumentNullException">Arguments null</exception>
        /// <exception cref="MasterDataIdentityNotDefined">Master data identity is not defined.</exception>
        public void SetBankKey(MasterDataIdentity bankKey)
        {
            if (bankKey == null)
            {
                throw new ArgumentNullException("Bank Key");
            }

            MasterDataManagement management = this._management;
            MasterDataBase       bankKeyId  = management.GetMasterData(bankKey,
                                                                       MasterDataType.BANK_KEY);

            if (bankKeyId == null)
            {
                throw new MasterDataIdentityNotDefined(bankKey,
                                                       MasterDataType.BANK_KEY);
            }

            this.SetDirtyData();
            _bankKey = bankKeyId.GetIdentity();
        }