Namespace: OpenEdge.DataAdmin.Binding
Class
PartitionPolicyContext
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)
ConvertTokensToSubstitute (character, character, character)
CopyTable (IDataAdminModel)
CopyTable (table)
OpenEdge.DataAdmin.IDataAdminCollection CreateCollection (IDataAdminContext)
OpenEdge.DataAdmin.IDataAdminElement CreateEntity (IRequestInfo)
OpenEdge.DataAdmin.Message.IFetchRequest CreatePartitionRefreshRequest (character) /* end method. */
CreateRow (IDataAdminElement) /* the default syserror has all info */
CreateRow (IPartitionPolicy)
DataRefreshed (IFetchResponse)
DeletePartitionAfterQuery ()
LOGICAL DeserializeRow (handle, log)
LOGICAL Fetch (character)
INTEGER FetchNumFields (character)
CHARACTER FetchTableName (character)
FillNewDetails (character)
FillNewDetails (character, character) /* fill details from data - generate name from tokenized template @param - policy name @param pcTemplate - see description/format in IPartitionPolicy:AddDetailsFromData(template) */
FillNewDetails (character, character, character) /* fill details from data - generate name using substitute base and substitute argstemplate @param - policy name @param pcSubstituteBase optional base template for detail name to be used in ABL substitute @param pcSubstituteArgs optional args to be used in ABL substitute for detail name see substitute param description/format in IPartitionPolicy:AddDetailsFromData(pcSubstituteBase,pcSubstituteArgs) */
FillNewDetails (IFetchRequest)
LOGICAL Find (character)
LOGICAL Find (integer)
CHARACTER FindExpression (character) /* 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 GetCreateError (IPartitionPolicy)
CHARACTER GetIntegerKey ()
CHARACTER GetJoinFields (character)
OpenEdge.DataAdmin.Binding.IDataAdminModel GetNamedChild (character) /* support many-to-many to fields (tenants as child) */
OpenEdge.DataAdmin.Message.IFetchRequest GetNewDetailRequest (character, character, character) /* get request for details from data @param - policy name @param pcSubstituteBase optional template for detail name to be used in ABL substitute @param pcSubstituteArgs optional args to be used in ABL substitute for detail name Note: if substitute params not passed we check if a template is imported from json and convert it into substitute params */
HANDLE GetQueryHandles (character) /* end method. */
InitChildren ()
InitChildren (IContextScope)
InitChildren (ISchemaScope) /* field needs to be first - used to export values for detail */
HANDLE InitDataset () /* temporary until all sub classes are using createDataset */
MergeChanges (ISaveRequest) /* refresh tables with policyname */
ReadRow (JsonObject, character) /*overide to read DetailNameTemplate which is hidden (and not persisted - only used in adddetailsfromdata)*/
LOGICAL RefreshTables (handle)
SerializeRow (handle)
SetTreeOptions (IDataTree)
ValidateBuffer (handle)
ValidatePolicy (IPartitionPolicy)
ValueChanged (character, character, character) /** fires after change - validation should have been done */

Constructor Summary
Options Name Purpose
PartitionPolicyContext ()
PartitionPolicyContext (ISchemaScope)

Property Summary
Options Name Purpose
INTEGER Count
CHARACTER CreateReadOnlyError
CHARACTER KeyFields
HANDLE TableHandle


Method Detail
Top

LOGICAL CanFind (character)

Parameters:
name CHARACTER
Returns LOGICAL
Top

ConvertTokensToSubstitute (character, character, character)

Parameters:
pctemplate CHARACTER
pcresult CHARACTER
pcTokens CHARACTER
Top

CopyTable (IDataAdminModel)

Parameters:
cntxt OpenEdge.DataAdmin.Binding.IDataAdminModel
Top

CopyTable (table)

Parameters:
copytable TABLE
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.Message.IFetchRequest CreatePartitionRefreshRequest (character)

/* end method.
Parameters:
pcGroup CHARACTER
Returns OpenEdge.DataAdmin.Message.IFetchRequest
Top

CreateRow (IDataAdminElement)

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

CreateRow (IPartitionPolicy)

Parameters:
policy OpenEdge.DataAdmin.IPartitionPolicy
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 Fetch (character)

Parameters:
pPartitionPolicyName CHARACTER
Returns LOGICAL
Top

INTEGER FetchNumFields (character)

Parameters:
pPartitionPolicyName CHARACTER
Returns INTEGER
Top

CHARACTER FetchTableName (character)

Parameters:
pPartitionPolicyName CHARACTER
Returns CHARACTER
Top

FillNewDetails (character)

Parameters:
pcPolicyname CHARACTER
Top

FillNewDetails (character, character)

/* fill details from data - generate name from tokenized template
Parameters:
pcPolicyname CHARACTER
pcTemplate CHARACTER
Top

FillNewDetails (character, character, character)

/* fill details from data - generate name using substitute base and substitute argstemplate
see substitute param description/format in IPartitionPolicy:AddDetailsFromData(pcSubstituteBase,pcSubstituteArgs)
Parameters:
pcPolicyname CHARACTER
pcSubstituteBase CHARACTER
pcSubstituteArgs CHARACTER
Top

FillNewDetails (IFetchRequest)

Parameters:
request OpenEdge.DataAdmin.Message.IFetchRequest
Top

LOGICAL Find (character)

Parameters:
name CHARACTER
Returns LOGICAL
Top

LOGICAL Find (integer)

Parameters:
id INTEGER
Returns LOGICAL
Top

CHARACTER FindExpression (character)

/*
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.
Parameters:
c CHARACTER
Returns CHARACTER
Top

CHARACTER GetCreateError (IPartitionPolicy)

Parameters:
policy OpenEdge.DataAdmin.IPartitionPolicy
Returns CHARACTER
Top

CHARACTER GetIntegerKey ()

Returns CHARACTER
Top

CHARACTER GetJoinFields (character)

Parameters:
parentid CHARACTER
Returns CHARACTER
Top

OpenEdge.DataAdmin.Binding.IDataAdminModel GetNamedChild (character)

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

OpenEdge.DataAdmin.Message.IFetchRequest GetNewDetailRequest (character, character, character)

/* get request for details from data
Note: if substitute params not passed we check if a template is imported from json and
convert it into substitute params
Parameters:
pcPolicyname CHARACTER
pcSubstituteBase CHARACTER
pcSubstituteArgs CHARACTER
Returns OpenEdge.DataAdmin.Message.IFetchRequest
Top

HANDLE GetQueryHandles (character)

/* end method.
Parameters:
pcParent CHARACTER
Returns HANDLE
Top

InitChildren ()

Top

InitChildren (IContextScope)

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

InitChildren (ISchemaScope)

/* field needs to be first - used to export values for detail
Parameters:
pscope OpenEdge.DataAdmin.Binding.Factory.ISchemaScope
Top

HANDLE InitDataset ()

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

MergeChanges (ISaveRequest)

/* refresh tables with policyname
Parameters:
pResponse OpenEdge.DataAdmin.Message.ISaveRequest
Top

ReadRow (JsonObject, character)

/*overide to read DetailNameTemplate which is hidden (and not persisted - only used in adddetailsfromdata)
Parameters:
pjson Progress.Json.ObjectModel.JsonObject
pcExceptColumns CHARACTER
Top

LOGICAL RefreshTables (handle)

Parameters:
pdsChanged HANDLE
Returns LOGICAL
Top

SerializeRow (handle)

Parameters:
phStream HANDLE
Top

SetTreeOptions (IDataTree)

Parameters:
tree OpenEdge.DataAdmin.Binding.IDataTree
Top

ValidateBuffer (handle)

Parameters:
phPolicy HANDLE
Top

ValidatePolicy (IPartitionPolicy)

Parameters:
policy OpenEdge.DataAdmin.IPartitionPolicy
Top

ValueChanged (character, character, character)

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


Constructor Detail
Top

PartitionPolicyContext ()

Top

PartitionPolicyContext (ISchemaScope)

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


Property Detail
Top

INTEGER Count

Returns INTEGER
Top

CHARACTER CreateReadOnlyError

Returns CHARACTER
Top

CHARACTER KeyFields

Returns CHARACTER
Top

HANDLE TableHandle

Returns HANDLE


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15