businessentity

package
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2024 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActualDifference

type ActualDifference struct {
	SpecType string
	Path     string
	Kind     string
	State    string
	OldValue interface{}
	NewValue interface{}
}

type BusinessEntity

type BusinessEntity struct {
	*actual.Role
}

func (*BusinessEntity) GetActual

func (this *BusinessEntity) GetActual(isState bool) map[string]interface{}

func (*BusinessEntity) GetBoolProperty

func (this *BusinessEntity) GetBoolProperty(path string) bool

func (*BusinessEntity) GetFloatProperty

func (this *BusinessEntity) GetFloatProperty(path string) float64

func (*BusinessEntity) GetInt64Property

func (this *BusinessEntity) GetInt64Property(path string) int64

func (*BusinessEntity) GetIntProperty

func (this *BusinessEntity) GetIntProperty(path string) int

func (*BusinessEntity) GetStringProperty

func (this *BusinessEntity) GetStringProperty(path string) string

func (*BusinessEntity) GetTimeProperty

func (this *BusinessEntity) GetTimeProperty(path string) *time.Time

func (*BusinessEntity) GetUint64Property

func (this *BusinessEntity) GetUint64Property(path string) uint64

func (*BusinessEntity) GetUintProperty

func (this *BusinessEntity) GetUintProperty(path string) uint

func (*BusinessEntity) Update

func (this *BusinessEntity) Update(actual map[string]interface{}, isState bool, isCheckActualId bool) map[uint64]map[string]error

type BusinessEntityDifference

type BusinessEntityDifference struct {
	PromptMessages map[string]map[string]*RuleMessage
	/**
	 * @Fields compareResult : 所有的差异记录在一个多键值的映射中,包含角色和属性
	 *         角色的变化包含包含增加,修改,删除的角色(由BusinessEntity包裹), 在相同角色下的属性修改,变化的结果是一个列表,
	 *         每一行代表一个修改的属性,每个差异代表属性的名称,旧值和新值
	 */
	CompareRoleResult       map[string][]*ActualDifference
	ComparePropertiesResult map[string][]*ActualDifference
}

func (*BusinessEntityDifference) CompareRole

func (this *BusinessEntityDifference) CompareRole(src *actual.Role, target *actual.Role)

type BusinessEntityService

type BusinessEntityService struct {
}

* 在BusinessEntity未被取出或者装载的情况下的操作

func GetBusinessEntityService

func GetBusinessEntityService() *BusinessEntityService

func (*BusinessEntityService) AddRole

func (this *BusinessEntityService) AddRole(schemaName string, id uint64, parentId uint64, kind string, values map[string]interface{}) (*BusinessEntity, *actual.Role)

func (*BusinessEntityService) Create

func (this *BusinessEntityService) Create(schemaName string, specId uint64, effectiveDate *time.Time) (*BusinessEntity, error)

func (*BusinessEntityService) Delete

func (this *BusinessEntityService) Delete(schemaName string, id uint64) (int64, error)

* 装载实例树,逐条删除,速度较慢

func (*BusinessEntityService) Find

func (this *BusinessEntityService) Find(schemaName string, id uint64, path string, isState bool) (interface{}, string, bool)

func (*BusinessEntityService) Get

func (this *BusinessEntityService) Get(schemaName string, id uint64) *BusinessEntity

func (*BusinessEntityService) GetActual

func (this *BusinessEntityService) GetActual(schemaName string, id uint64, isState bool) map[string]interface{}

func (*BusinessEntityService) Load

func (this *BusinessEntityService) Load(schemaName string, id uint64) *BusinessEntity

func (*BusinessEntityService) LoadRole

func (this *BusinessEntityService) LoadRole(schemaName string, id uint64, parentId uint64, kind string) (*BusinessEntity, []*actual.Role)

func (*BusinessEntityService) RemoveRole

func (this *BusinessEntityService) RemoveRole(schemaName string, id uint64, roleId uint64, path string) (*BusinessEntity, error)

func (*BusinessEntityService) Save

func (this *BusinessEntityService) Save(schemaName string, id uint64) (*BusinessEntity, error)

func (*BusinessEntityService) SetValue

func (this *BusinessEntityService) SetValue(data map[string]interface{}) (*BusinessEntity, error)

* 根据映射中的id,parentId,path等字段获取角色和需要修改数据的子角色,并修改数据values映射

func (*BusinessEntityService) Update

func (this *BusinessEntityService) Update(actual map[string]interface{}) (*BusinessEntity, map[uint64]map[string]error)

func (*BusinessEntityService) Version

func (this *BusinessEntityService) Version(schemaName string, id uint64) (*BusinessEntity, error)

type RuleMessage

type RuleMessage struct {
	Kind            string
	ReturnValue     string
	MessageCode     string
	Message         string
	BusinessMessage string
	InParaMeterDesc string
	Parameters      []interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL