import { IPSAppDEField } from '../../app/dataentity/ipsapp-defield'; import { IPSCodeList } from '../../codelist/ipscode-list'; import { IPSDEDataViewDataItem } from './ipsdedata-view-data-item'; import { PSDataItemImpl } from '../../data/psdata-item-impl'; export class PSDEDataViewDataItemImpl extends PSDataItemImpl implements IPSDEDataViewDataItem { protected frontpscodelist: IPSCodeList | null = null; getFrontPSCodeList(): IPSCodeList | null { if (this.frontpscodelist != null) return this.frontpscodelist; const value = this.M.getFrontPSCodeList; if (value == null) { return null; } this.frontpscodelist = this.getPSModel4('codelist.IPSCodeList', value, 'getFrontPSCodeList') as IPSCodeList; return this.frontpscodelist; } get frontPSCodeList(): IPSCodeList | null { return this.getFrontPSCodeList(); } getFrontPSCodeListMust(): IPSCodeList { const value = this.getFrontPSCodeList(); if (value == null) { throw new Error('未指定前端代码表对象'); } return value; } 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 customCode(): boolean { return this.M.customCode != null ? this.M.customCode : false; } get cls(): string { return 'PSDEDataViewDataItemImpl'; } instanceof(cls: string): boolean { if (cls == 'control.dataview.IPSDEDataViewDataItem') return true; return super.instanceof(cls); } }