import Ember from 'ember';
import DS from 'ember-data';
import { Projection } from 'ember-flexberry-data';
export let Model = Ember.Mixin.create({
/**
Non-stored property.
@property assocType
*/
assocType: DS.attr('string'),
/**
Method to set non-stored property.
Please, use code below in model class (outside of this mixin) otherwise it will be replaced during regeneration of models.
Please, implement 'assocTypeCompute' method in model class (outside of this mixin) if you want to compute value of 'assocType' property.
@method _assocTypeCompute
@private
@example
```javascript
_assocTypeChanged: Ember.on('init', Ember.observer('assocType', function() {
Ember.run.once(this, '_assocTypeCompute');
}))
```
*/
_assocTypeCompute: function() {
let result = (this.assocTypeCompute && typeof this.assocTypeCompute === 'function') ? this.assocTypeCompute() : null;
this.set('assocType', result);
},
autoGenerateDetailTypeUsage: DS.attr('boolean'),
autoGenerateTypeUsage: DS.attr('boolean'),
detailTypeUsage: DS.attr('string'),
pBAggregatorCustomAttributes: DS.attr('boolean'),
pBAggregatorGetEnd: DS.attr('boolean'),
pBAggregatorGetStart: DS.attr('boolean'),
pBAggregatorSetEnd: DS.attr('boolean'),
pBAggregatorSetStart: DS.attr('boolean'),
pBDetailCustomAttributes: DS.attr('boolean'),
pBDetailGetEnd: DS.attr('boolean'),
pBDetailGetStart: DS.attr('boolean'),
pBDetailSetEnd: DS.attr('boolean'),
pBDetailSetStart: DS.attr('boolean'),
pBMasterCustomAttributes: DS.attr('boolean'),
pBMasterGetEnd: DS.attr('boolean'),
pBMasterGetStart: DS.attr('boolean'),
pBMasterSetEnd: DS.attr('boolean'),
pBMasterSetStart: DS.attr('boolean'),
/**
Non-stored property.
@property realStorage
*/
realStorage: DS.attr('string'),
/**
Method to set non-stored property.
Please, use code below in model class (outside of this mixin) otherwise it will be replaced during regeneration of models.
Please, implement 'realStorageCompute' method in model class (outside of this mixin) if you want to compute value of 'realStorage' property.
@method _realStorageCompute
@private
@example
```javascript
_realStorageChanged: Ember.on('init', Ember.observer('realStorage', function() {
Ember.run.once(this, '_realStorageCompute');
}))
```
*/
_realStorageCompute: function() {
let result = (this.realStorageCompute && typeof this.realStorageCompute === 'function') ? this.realStorageCompute() : null;
this.set('realStorage', result);
},
typeUsage: DS.attr('string'),
getValidations: function () {
let parentValidations = this._super();
let thisValidations = {
};
return Ember.$.extend(true, {}, parentValidations, thisValidations);
},
init: function () {
this.set('validations', this.getValidations());
this._super.apply(this, arguments);
}
});
export let defineBaseModel = function (modelClass) {
modelClass.reopenClass({
_parentModelName: 'fd-dev-base-association'
});
};
export let defineProjections = function (modelClass) {
modelClass.defineProjection('Edit', 'fd-dev-aggregation', {
description: Projection.attr(''),
startRole: Projection.attr(''),
startRolePublishName: Projection.attr(''),
endRole: Projection.attr(''),
endRolePublishName: Projection.attr(''),
startMultiplicity: Projection.attr(''),
endRoleStored: Projection.attr(''),
autoGenerateTypeUsage: Projection.attr('Aggregator AutoGenerateTypeUsage'),
typeUsage: Projection.attr('Aggregator TypeUsage'),
storage: Projection.attr('Aggregator Storage'),
autoStoreMasterDisabled: Projection.attr(''),
autoGenerateDetailTypeUsage: Projection.attr('Detail AutoGenerateTypeUsage'),
detailTypeUsage: Projection.attr(''),
pBAggregatorCustomAttributes: Projection.attr(''),
pBAggregatorGetStart: Projection.attr(''),
pBAggregatorGetEnd: Projection.attr(''),
pBAggregatorSetStart: Projection.attr(''),
pBAggregatorSetEnd: Projection.attr(''),
pBDetailCustomAttributes: Projection.attr(''),
pBDetailGetStart: Projection.attr(''),
pBDetailGetEnd: Projection.attr(''),
pBDetailSetStart: Projection.attr(''),
pBDetailSetEnd: Projection.attr('')
});
modelClass.defineProjection('FdPreloadMetadata', 'fd-dev-aggregation', {
autoGenerateDetailTypeUsage: Projection.attr(''),
autoGenerateTypeUsage: Projection.attr(''),
detailTypeUsage: Projection.attr(''),
pBAggregatorCustomAttributes: Projection.attr(''),
pBAggregatorGetEnd: Projection.attr(''),
pBAggregatorGetStart: Projection.attr(''),
pBAggregatorSetEnd: Projection.attr(''),
pBAggregatorSetStart: Projection.attr(''),
pBDetailCustomAttributes: Projection.attr(''),
pBDetailGetEnd: Projection.attr(''),
pBDetailGetStart: Projection.attr(''),
pBDetailSetEnd: Projection.attr(''),
pBDetailSetStart: Projection.attr(''),
pBMasterCustomAttributes: Projection.attr(''),
pBMasterGetEnd: Projection.attr(''),
pBMasterGetStart: Projection.attr(''),
pBMasterSetEnd: Projection.attr(''),
pBMasterSetStart: Projection.attr(''),
typeUsage: Projection.attr(''),
autoStoreMasterDisabled: Projection.attr(''),
storage: Projection.attr(''),
startRolePublishName: Projection.attr(''),
endRolePublishName: Projection.attr(''),
endMultiplicity: Projection.attr(''),
endRole: Projection.attr(''),
endRoleAccessModifier: Projection.attr(''),
endRoleStored: Projection.attr(''),
startMultiplicity: Projection.attr(''),
startRole: Projection.attr(''),
startRoleAccessModifier: Projection.attr(''),
referenceCount: Projection.attr(''),
name: Projection.attr(''),
description: Projection.attr(''),
stage: Projection.belongsTo('fd-stage', '', {
name: Projection.attr('')
}),
endClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr('')
}),
startClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr('')
})
});
modelClass.defineProjection('Gen', 'fd-dev-aggregation', {
pBAggregatorCustomAttributes: Projection.attr(''),
pBAggregatorGetEnd: Projection.attr(''),
pBAggregatorGetStart: Projection.attr(''),
pBAggregatorSetEnd: Projection.attr(''),
pBAggregatorSetStart: Projection.attr(''),
pBDetailCustomAttributes: Projection.attr(''),
pBDetailGetEnd: Projection.attr(''),
pBDetailGetStart: Projection.attr(''),
pBDetailSetEnd: Projection.attr(''),
pBDetailSetStart: Projection.attr(''),
pBMasterCustomAttributes: Projection.attr(''),
pBMasterGetEnd: Projection.attr(''),
pBMasterGetStart: Projection.attr(''),
pBMasterSetEnd: Projection.attr(''),
pBMasterSetStart: Projection.attr(''),
storage: Projection.attr(''),
autoStoreMasterDisabled: Projection.attr(''),
typeUsage: Projection.attr(''),
autoGenerateTypeUsage: Projection.attr(''),
autoGenerateDetailTypeUsage: Projection.attr(''),
description: Projection.attr('')
});
modelClass.defineProjection('Generator', 'fd-dev-aggregation', {
assocType: Projection.attr('AssocType', { hidden: true }),
autoGenerateDetailTypeUsage: Projection.attr('AutoGenerateDetailTypeUsage', { hidden: true }),
autoGenerateTypeUsage: Projection.attr('AutoGenerateTypeUsage', { hidden: true }),
detailTypeUsage: Projection.attr('DetailTypeUsage', { hidden: true }),
pBAggregatorCustomAttributes: Projection.attr('PBAggregatorCustomAttributes', { hidden: true }),
pBAggregatorGetEnd: Projection.attr('PBAggregatorGetEnd', { hidden: true }),
pBAggregatorGetStart: Projection.attr('PBAggregatorGetStart', { hidden: true }),
pBAggregatorSetEnd: Projection.attr('PBAggregatorSetEnd', { hidden: true }),
pBAggregatorSetStart: Projection.attr('PBAggregatorSetStart', { hidden: true }),
pBDetailCustomAttributes: Projection.attr('PBDetailCustomAttributes', { hidden: true }),
pBDetailGetEnd: Projection.attr('PBDetailGetEnd', { hidden: true }),
pBDetailGetStart: Projection.attr('PBDetailGetStart', { hidden: true }),
pBDetailSetEnd: Projection.attr('PBDetailSetEnd', { hidden: true }),
pBDetailSetStart: Projection.attr('PBDetailSetStart', { hidden: true }),
pBMasterCustomAttributes: Projection.attr('PBMasterCustomAttributes', { hidden: true }),
pBMasterGetEnd: Projection.attr('PBMasterGetEnd', { hidden: true }),
pBMasterGetStart: Projection.attr('PBMasterGetStart', { hidden: true }),
pBMasterSetEnd: Projection.attr('PBMasterSetEnd', { hidden: true }),
pBMasterSetStart: Projection.attr('PBMasterSetStart', { hidden: true }),
realStorage: Projection.attr('RealStorage', { hidden: true }),
typeUsage: Projection.attr('TypeUsage', { hidden: true }),
autoStoreMasterDisabled: Projection.attr('AutoStoreMasterDisabled', { hidden: true }),
realEndRole: Projection.attr('RealEndRole', { hidden: true }),
realStartRole: Projection.attr('RealStartRole', { hidden: true }),
storage: Projection.attr('Storage', { hidden: true }),
startRolePublishName: Projection.attr('StartRolePublishName', { hidden: true }),
endRolePublishName: Projection.attr('EndRolePublishName', { hidden: true }),
endMultiplicity: Projection.attr('EndMultiplicity', { hidden: true }),
endRole: Projection.attr('EndRole', { hidden: true }),
endRoleAccessModifier: Projection.attr('EndRoleAccessModifier', { hidden: true }),
endRoleStored: Projection.attr('EndRoleStored', { hidden: true }),
endRoleStr: Projection.attr('EndRoleStr', { hidden: true }),
notNullStart: Projection.attr('NotNullStart', { hidden: true }),
startMultiplicity: Projection.attr('StartMultiplicity', { hidden: true }),
startRole: Projection.attr('StartRole', { hidden: true }),
startRoleAccessModifier: Projection.attr('StartRoleAccessModifier', { hidden: true }),
startRoleStored: Projection.attr('StartRoleStored', { hidden: true }),
startRoleStr: Projection.attr('StartRoleStr', { hidden: true }),
referenceCount: Projection.attr('ReferenceCount', { hidden: true }),
name: Projection.attr('Name', { hidden: true }),
description: Projection.attr('Description', { hidden: true }),
nameStr: Projection.attr('NameStr', { hidden: true }),
endClass: Projection.belongsTo('fd-class', 'EndClass', {
}, { hidden: true }),
startClass: Projection.belongsTo('fd-class', 'StartClass', {
}, { hidden: true })
});
modelClass.defineProjection('ListFormView', 'fd-dev-aggregation', {
startClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr('Start class')
}, { hidden: true }),
endClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr('End class')
}, { hidden: true }),
startRole: Projection.attr('Start role'),
endRole: Projection.attr('End role'),
storage: Projection.attr('Storage')
});
/* merged manually start */
modelClass.defineProjection('FormConstructor', 'fd-dev-association', {
startRole: Projection.attr(''),
startClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr(''),
}),
endClass: Projection.belongsTo('fd-class', '', {
name: Projection.attr(''),
}),
stage: Projection.belongsTo('fd-stage', '', {}),
});
/* merged manually end */
};