import { IPSDataEntity } from '../dataentity/ipsdata-entity'; import { IPSDEField } from '../dataentity/defield/ipsdefield'; import { IPSSysSFPlugin } from './ipssys-sfplugin'; import { IPSSysTranslator } from './ipssys-translator'; import { IPSSystemModule } from '../system/ipssystem-module'; import { PSModelObjectImpl } from '../psmodel-object-impl'; export class PSSysTranslatorImpl extends PSModelObjectImpl implements IPSSysTranslator { get codeName(): string { return this.M.codeName; } get dynaModelFilePath(): string { return this.M.dynaModelFilePath; } protected keypsdefield: IPSDEField | null = null; getKeyPSDEField(): IPSDEField | null { if (this.keypsdefield != null) return this.keypsdefield; const value = this.M.getKeyPSDEField; if (value == null) { return null; } const ipsdataentity = this.getPSDataEntity(); if (ipsdataentity != null) { this.keypsdefield = ipsdataentity.findPSDEField(value); } return this.keypsdefield; } get keyPSDEField(): IPSDEField | null { return this.getKeyPSDEField(); } getKeyPSDEFieldMust(): IPSDEField { const value = this.getKeyPSDEField(); if (value == null) { throw new Error('未指定标识存储属性'); } return value; } get mOSFilePath(): string { return this.M.mOSFilePath; } get memo(): string { return this.M.memo; } get name(): string { return this.M.name; } protected psdataentity: IPSDataEntity | null = null; getPSDataEntity(): IPSDataEntity | null { if (this.psdataentity != null) return this.psdataentity; const value = this.M.getPSDataEntity; if (value == null) { return null; } this.psdataentity = this.getPSModel4('dataentity.IPSDataEntity', value, 'getPSDataEntity') as IPSDataEntity; return this.psdataentity; } get psDataEntity(): IPSDataEntity | null { return this.getPSDataEntity(); } getPSDataEntityMust(): IPSDataEntity { const value = this.getPSDataEntity(); if (value == null) { throw new Error('未指定实体对象'); } return value; } protected pssyssfplugin: IPSSysSFPlugin | null = null; getPSSysSFPlugin(): IPSSysSFPlugin | null { if (this.pssyssfplugin != null) return this.pssyssfplugin; const value = this.M.getPSSysSFPlugin; if (value == null) { return null; } this.pssyssfplugin = this.getPSModel4('res.IPSSysSFPlugin', value, 'getPSSysSFPlugin') as IPSSysSFPlugin; return this.pssyssfplugin; } get psSysSFPlugin(): IPSSysSFPlugin | null { return this.getPSSysSFPlugin(); } getPSSysSFPluginMust(): IPSSysSFPlugin { const value = this.getPSSysSFPlugin(); if (value == null) { throw new Error('未指定后端模板插件对象'); } return value; } protected pssystemmodule: IPSSystemModule | null = null; getPSSystemModule(): IPSSystemModule | null { if (this.pssystemmodule != null) return this.pssystemmodule; const value = this.M.getPSSystemModule; if (value == null) { return null; } this.pssystemmodule = this.getPSModel4('system.IPSSystemModule', value, 'getPSSystemModule') as IPSSystemModule; return this.pssystemmodule; } get psSystemModule(): IPSSystemModule | null { return this.getPSSystemModule(); } getPSSystemModuleMust(): IPSSystemModule { const value = this.getPSSystemModule(); if (value == null) { throw new Error('未指定系统模块'); } return value; } get rTMOSFilePath(): string { return this.M.rTMOSFilePath; } get translatorTag(): string { return this.M.translatorTag; } get translatorTag2(): string { return this.M.translatorTag2; } get translatorType(): 'DIGEST' | 'ENCRYPT' | 'DESTORAGE' | 'USER' | 'USER2' | 'USER3' | 'USER4' { return this.M.translatorType; } get userCat(): string { return this.M.userCat; } get userTag(): string { return this.M.userTag; } get userTag2(): string { return this.M.userTag2; } get userTag3(): string { return this.M.userTag3; } get userTag4(): string { return this.M.userTag4; } protected valuepsdefield: IPSDEField | null = null; getValuePSDEField(): IPSDEField | null { if (this.valuepsdefield != null) return this.valuepsdefield; const value = this.M.getValuePSDEField; if (value == null) { return null; } const ipsdataentity = this.getPSDataEntity(); if (ipsdataentity != null) { this.valuepsdefield = ipsdataentity.findPSDEField(value); } return this.valuepsdefield; } get valuePSDEField(): IPSDEField | null { return this.getValuePSDEField(); } getValuePSDEFieldMust(): IPSDEField { const value = this.getValuePSDEField(); if (value == null) { throw new Error('未指定值存储属性'); } return value; } get cls(): string { return 'PSSysTranslatorImpl'; } instanceof(cls: string): boolean { if (cls == 'res.IPSSysTranslator') return true; return super.instanceof(cls); } }