import { DeSerializers } from '../de-serializers' ; import { EntityBase , Constructable } from '../entity-base' ; import { EdmTypeField } from './edm-type-field' ; import { Field } from './field' ; import { FieldBuilder } from './field-builder' ; import { OrderableEdmTypeField } from './orderable-edm-type-field' ; internal export class CustomField < EntityT extends EntityBase , DeSerializersT extends DeSerializers , NullableT extends boolean = false > extends Field < EntityT , NullableT > { protected fieldBuilder : FieldBuilder < Constructable < EntityT > , DeSerializersT > ; constructor ( fieldName , entityConstructor , private deSerializers , isNullable = false as NullableT ) { super ( fieldName , entityConstructor , { isNullable } ) ; this . fieldBuilder = new FieldBuilder ( entityConstructor , this . deSerializers ) ; } edmString ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.String' , this . _fieldOptions . isNullable ) ; } edmBoolean ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Boolean' , this . _fieldOptions . isNullable ) ; } edmGuid ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Guid' , this . _fieldOptions . isNullable ) ; } edmDecimal ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Decimal' , this . _fieldOptions . isNullable ) ; } edmInt16 ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Int16' , this . _fieldOptions . isNullable ) ; } edmInt32 ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Int32' , this . _fieldOptions . isNullable ) ; } edmInt64 ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Int64' , this . _fieldOptions . isNullable ) ; } edmSingle ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Single' , this . _fieldOptions . isNullable ) ; } edmDouble ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Double' , this . _fieldOptions . isNullable ) ; } edmByte ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Byte' , this . _fieldOptions . isNullable ) ; } edmSByte ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.SByte' , this . _fieldOptions . isNullable ) ; } edmDateTimeOffset ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.DateTimeOffset' , this . _fieldOptions . isNullable ) ; } edmBinary ( ) { return this . fieldBuilder . buildEdmTypeField ( this . _fieldName , 'Edm.Binary' , this . _fieldOptions . isNullable ) ; } }