Namespace: OpenEdge.DataAdmin.Binding
Class
TenantContext
Parent classes:
Inherits: OpenEdge.DataAdmin.Binding.DataAdminContext
Implements: OpenEdge.DataAdmin.Binding.IDataAdminContext

/* Copyright (c) 2011-2013 by progress Software Corporation
/*
/* all rights reserved. no part of this program or document
/* may be reproduced in any form or by any means without
/* permission in writing from progress Software Corporation.
Purpose:Tenant Context/Model
Author(s):hdaniels
Created:Tue Aug 03 2010




Method Summary
Options Name Purpose
LOGICAL CanFind (character)
LOGICAL CanFind (integer)
LOGICAL CanFindByExternalId (character)
CopyTable (IDataAdminModel) /* end method. */
CopyTable (table)
OpenEdge.DataAdmin.IDataAdminCollection CreateCollection (character, FilteredContext)
OpenEdge.DataAdmin.IDataAdminCollection CreateCollection (IDataAdminContext)
OpenEdge.DataAdmin.IDataAdminElement CreateEntity (IRequestInfo)
OpenEdge.DataAdmin.Binding.Query.FilteredContext CreateFilteredContext (IRow, IRequestInfo)
CreatePartitionAfterQuery (handle)
OpenEdge.DataAdmin.Message.IFetchRequest CreatePartitionRefreshRequest (character)
CreateRow (IDataAdminElement) /* the default syserror has all info */
CreateRow (ITenant)
HANDLE CreateSaveDataset () /* override to use Name in JSON import method protected override character GetClientKeyFields(): return "Name". end method. */
DataRefreshed (IFetchResponse)
DeletePartitionAfterQuery ()
LOGICAL DeserializeRow (handle, log)
LOGICAL Find (character)
LOGICAL Find (integer)
LOGICAL FindByExternalId (character)
CHARACTER FindExpression (character)
CHARACTER FindExpression (integer)
OpenEdge.DataAdmin.IDataAdminElement FindTenantByExternalId (character)
CHARACTER GetChildQuery (IRow)
CHARACTER GetCreateError (ITenant)
CHARACTER GetIntegerKey () /* method private IFetchRequest CreatePartitionRefreshRequest (): define variable tree as IContextTree no-undo. define variable msg as IFetchRequest no-undo. tree = new ContextTree(). tree:Parse = true. tree:SetHandle("requests",buffer ttPartitionIdRequest:handle). GetChild("partitions"):AddTableTo(tree). msg = new FetchRequest("Partition",Id,tree:GetReadHandle()). return msg. end method. */
CHARACTER GetJoinFields (character)
OpenEdge.DataAdmin.Binding.IDataAdminModel GetNamedChild (character) /* support many-to-many to tenants (tenants as child) */
HANDLE GetQueryHandles (character)
CHARACTER GetServerChildQuery (IRow)
OpenEdge.DataAdmin.IDataAdminElement GetTenantByExternalId (character)
initChildren ()
initChildren (IContextScope)
initChildren (IMultiTenantScope)
HANDLE InitDataset () /* temporary until all sub classes are using createDataset */
MergeChanges (ISaveRequest) /** refresh partitions for create NewPartitionContext retrieved these */
LOGICAL PartitionsNeedRefresh (character) /** called from merge to check if allocationstate of a table changed */
LOGICAL RefreshPartitions (handle)
SerializeRow (handle)
ValidateBuffer (handle)
ValidateTenant (ITenant)
ValidateType (character, character)
ValueChanged (character, character, character) /** fires after change - validation should have been done */

Constructor Summary
Options Name Purpose
TenantContext ()
TenantContext (IMultiTenantScope)

Property Summary
Options Name Purpose
INTEGER Count
CHARACTER KeyFields
HANDLE TableHandle


Method Detail
Top

LOGICAL CanFind (character)

Parameters:
name CHARACTER
Returns LOGICAL
Top

LOGICAL CanFind (integer)

Parameters:
id INTEGER
Returns LOGICAL
Top

LOGICAL CanFindByExternalId (character)

Parameters:
ExtId CHARACTER
Returns LOGICAL
Top

CopyTable (IDataAdminModel)

/* end method.
Parameters:
cntxt OpenEdge.DataAdmin.Binding.IDataAdminModel
Top

CopyTable (table)

Parameters:
copytable TABLE
Top

OpenEdge.DataAdmin.IDataAdminCollection CreateCollection (character, FilteredContext)

Parameters:
pparent CHARACTER
pcntxt OpenEdge.DataAdmin.Binding.Query.FilteredContext
Returns OpenEdge.DataAdmin.IDataAdminCollection
Top

OpenEdge.DataAdmin.IDataAdminCollection CreateCollection (IDataAdminContext)

Parameters:
cntxt OpenEdge.DataAdmin.Binding.IDataAdminContext
Returns OpenEdge.DataAdmin.IDataAdminCollection
Top

OpenEdge.DataAdmin.IDataAdminElement CreateEntity (IRequestInfo)

Parameters:
req OpenEdge.DataAdmin.IRequestInfo
Returns OpenEdge.DataAdmin.IDataAdminElement
Top

OpenEdge.DataAdmin.Binding.Query.FilteredContext CreateFilteredContext (IRow, IRequestInfo)

Parameters:
pparent OpenEdge.DataAdmin.Binding.IRow
pReq OpenEdge.DataAdmin.IRequestInfo
Returns OpenEdge.DataAdmin.Binding.Query.FilteredContext
Top

CreatePartitionAfterQuery (handle)

Parameters:
pbufferHandle HANDLE
Top

OpenEdge.DataAdmin.Message.IFetchRequest CreatePartitionRefreshRequest (character)

Parameters:
pcGroup CHARACTER
Returns OpenEdge.DataAdmin.Message.IFetchRequest
Top

CreateRow (IDataAdminElement)

/* the default syserror has all info
Parameters:
entity OpenEdge.DataAdmin.IDataAdminElement
Top

CreateRow (ITenant)

Parameters:
tenant OpenEdge.DataAdmin.ITenant
Top

HANDLE CreateSaveDataset ()

/* override to use Name in JSON import
method protected override character GetClientKeyFields():
return "Name".
end method.
Returns HANDLE
Top

DataRefreshed (IFetchResponse)

Parameters:
presponse OpenEdge.DataAdmin.Message.IFetchResponse
Top

DeletePartitionAfterQuery ()

Top

LOGICAL DeserializeRow (handle, log)

Parameters:
phStream HANDLE
plReplace LOGICAL
Returns LOGICAL
Top

LOGICAL Find (character)

Parameters:
name CHARACTER
Returns LOGICAL
Top

LOGICAL Find (integer)

Parameters:
id INTEGER
Returns LOGICAL
Top

LOGICAL FindByExternalId (character)

Parameters:
ExtId CHARACTER
Returns LOGICAL
Top

CHARACTER FindExpression (character)

Parameters:
c CHARACTER
Returns CHARACTER
Top

CHARACTER FindExpression (integer)

Parameters:
i INTEGER
Returns CHARACTER
Top

OpenEdge.DataAdmin.IDataAdminElement FindTenantByExternalId (character)

Parameters:
ExtId CHARACTER
Returns OpenEdge.DataAdmin.IDataAdminElement
Top

CHARACTER GetChildQuery (IRow)

Parameters:
pParent OpenEdge.DataAdmin.Binding.IRow
Returns CHARACTER
Top

CHARACTER GetCreateError (ITenant)

Parameters:
tenant OpenEdge.DataAdmin.ITenant
Returns CHARACTER
Top

CHARACTER GetIntegerKey ()

/*
method private IFetchRequest CreatePartitionRefreshRequest ():
define variable tree as IContextTree no-undo.
define variable msg as IFetchRequest no-undo.
tree = new ContextTree().
tree:Parse Parse = true.
tree:SetHandle("requests",buffer SetHandle("requests",buffer ttPartitionIdRequest:handle).
GetChild("partitions"):AddTableTo(tree). AddTableTo(tree).
msg = new FetchRequest("Partition",Id,tree:GetReadHandle()).
return msg.
end method.
Returns CHARACTER
Top

CHARACTER GetJoinFields (character)

Parameters:
parentid CHARACTER
Returns CHARACTER
Top

OpenEdge.DataAdmin.Binding.IDataAdminModel GetNamedChild (character)

/* support many-to-many to tenants (tenants as child)
Parameters:
pname CHARACTER
Returns OpenEdge.DataAdmin.Binding.IDataAdminModel
Top

HANDLE GetQueryHandles (character)

Parameters:
pcParent CHARACTER
Returns HANDLE
Top

CHARACTER GetServerChildQuery (IRow)

Parameters:
pParent OpenEdge.DataAdmin.Binding.IRow
Returns CHARACTER
Top

OpenEdge.DataAdmin.IDataAdminElement GetTenantByExternalId (character)

Parameters:
cKey CHARACTER
Returns OpenEdge.DataAdmin.IDataAdminElement
Top

initChildren ()

Top

initChildren (IContextScope)

Parameters:
pScope OpenEdge.DataAdmin.Binding.Factory.IContextScope
Top

initChildren (IMultiTenantScope)

Parameters:
pScope OpenEdge.DataAdmin.Binding.Factory.IMultiTenantScope
Top

HANDLE InitDataset ()

/* temporary until all sub classes are using createDataset
Returns HANDLE
Top

MergeChanges (ISaveRequest)

Purpose: refresh partitions for create
NewPartitionContext retrieved these
Parameters:
pResponse OpenEdge.DataAdmin.Message.ISaveRequest
Top

LOGICAL PartitionsNeedRefresh (character)

Purpose: called from merge to check if allocationstate of a table changed
Parameters:
pcTenant CHARACTER
Returns LOGICAL
Top

LOGICAL RefreshPartitions (handle)

Parameters:
pdsChanged HANDLE
Returns LOGICAL
Top

SerializeRow (handle)

Parameters:
phStream HANDLE
Top

ValidateBuffer (handle)

Parameters:
phTenant HANDLE
Top

ValidateTenant (ITenant)

Parameters:
tenant OpenEdge.DataAdmin.ITenant
Top

ValidateType (character, character)

Parameters:
pcKey CHARACTER
pcType CHARACTER
Top

ValueChanged (character, character, character)

Purpose: fires after change - validation should have been done
Parameters:
pFieldName CHARACTER
pcOldValue CHARACTER
pNewValue CHARACTER


Constructor Detail
Top

TenantContext ()

Top

TenantContext (IMultiTenantScope)

Parameters:
pScope OpenEdge.DataAdmin.Binding.Factory.IMultiTenantScope


Property Detail
Top

INTEGER Count

Returns INTEGER
Top

CHARACTER KeyFields

Returns CHARACTER
Top

HANDLE TableHandle

Returns HANDLE


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15