import { IPSAppDEField } from '../../app/dataentity/ipsapp-defield'; import { IPSDEGridDataItem } from './ipsdegrid-data-item'; import { PSDataItemImpl } from '../../data/psdata-item-impl'; export class PSDEGridDataItemImpl extends PSDataItemImpl implements IPSDEGridDataItem { get format(): string { return this.M.format; } protected psappdefield: IPSAppDEField | null = null; getPSAppDEField(): IPSAppDEField | null { if (this.psappdefield != null) return this.psappdefield; const value = this.M.getPSAppDEField; if (value == null) { return null; } this.psappdefield = this.getPSModel4('app.dataentity.IPSAppDEField', value, 'getPSAppDEField') as IPSAppDEField; return this.psappdefield; } get psAppDEField(): IPSAppDEField | null { return this.getPSAppDEField(); } getPSAppDEFieldMust(): IPSAppDEField { const value = this.getPSAppDEField(); if (value == null) { throw new Error('未指定应用实体属性'); } return value; } get scriptCode(): string { return this.M.scriptCode; } get valueType(): 'SIMPLE' | 'SIMPLES' | 'OBJECT' | 'OBJECTS' | 'USER' | 'USER2' { return this.M.valueType || 'SIMPLE'; } get customCode(): boolean { return this.M.customCode != null ? this.M.customCode : false; } get dataAccessAction(): boolean { return this.M.dataAccessAction != null ? this.M.dataAccessAction : false; } get cls(): string { return 'PSDEGridDataItemImpl'; } instanceof(cls: string): boolean { if (cls == 'control.grid.IPSDEGridDataItem') return true; return super.instanceof(cls); } }