Search in sources :

Example 1 with DataTypeDtoRequest

use of org.entando.entando.web.dataobject.model.DataTypeDtoRequest in project entando-core by entando.

the class DataObjectService method createEntityType.

@Override
protected DataObject createEntityType(IEntityManager entityManager, EntityTypeDtoRequest dto, BindingResult bindingResult) throws Throwable {
    DataObject dataObject = super.createEntityType(entityManager, dto, bindingResult);
    DataTypeDtoRequest dtr = (DataTypeDtoRequest) dto;
    if (this.checkModel(false, dataObject.getTypeCode(), dtr.getListModel(), bindingResult)) {
        dataObject.setListModel(dtr.getListModel());
    }
    if (this.checkModel(true, dataObject.getTypeCode(), dtr.getDefaultModel(), bindingResult)) {
        dataObject.setDefaultModel(dtr.getDefaultModel());
    }
    if (this.checkPage(dataObject.getTypeCode(), dtr.getViewPage(), bindingResult)) {
        dataObject.setViewPage(dtr.getViewPage());
    }
    return dataObject;
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) DataTypeDtoRequest(org.entando.entando.web.dataobject.model.DataTypeDtoRequest)

Aggregations

DataObject (org.entando.entando.aps.system.services.dataobject.model.DataObject)1 DataTypeDtoRequest (org.entando.entando.web.dataobject.model.DataTypeDtoRequest)1