Search in sources :

Example 1 with JAXBDataObjectType

use of org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType in project entando-core by entando.

the class ApiDataObjectTypeInterface method checkEntityTypeToUpdate.

@Override
protected void checkEntityTypeToUpdate(JAXBEntityType jaxbEntityType, IApsEntity entityTypeToUpdate, StringApiResponse response) throws ApiException, Throwable {
    JAXBDataObjectType jaxbDataObjectType = (JAXBDataObjectType) jaxbEntityType;
    DataObject dataType = (DataObject) entityTypeToUpdate;
    boolean defaultModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getDefaultModelId(), dataType, response);
    if (defaultModelCheck) {
        dataType.setDefaultModel(String.valueOf(jaxbDataObjectType.getDefaultModelId()));
    }
    boolean listModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getListModelId(), dataType, response);
    if (listModelCheck) {
        dataType.setListModel(String.valueOf(jaxbDataObjectType.getListModelId()));
    }
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) JAXBDataObjectType(org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType)

Example 2 with JAXBDataObjectType

use of org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType in project entando-core by entando.

the class ApiDataObjectTypeInterface method createJAXBEntityType.

@Override
protected JAXBEntityType createJAXBEntityType(IApsEntity masterEntityType) {
    DataObject masterDataObjectType = (DataObject) masterEntityType;
    JAXBDataObjectType jaxbDataObjectType = new JAXBDataObjectType(masterDataObjectType);
    jaxbDataObjectType.setDefaultModelId(this.extractModelId(masterDataObjectType.getDefaultModel()));
    jaxbDataObjectType.setListModelId(this.extractModelId(masterDataObjectType.getListModel()));
    return jaxbDataObjectType;
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) JAXBDataObjectType(org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType)

Example 3 with JAXBDataObjectType

use of org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType in project entando-core by entando.

the class ApiDataObjectTypeInterface method checkNewEntityType.

@Override
protected void checkNewEntityType(JAXBEntityType jaxbEntityType, IApsEntity newEntityType, StringApiResponse response) throws ApiException, Throwable {
    JAXBDataObjectType jaxbDataObjectType = (JAXBDataObjectType) jaxbEntityType;
    DataObject dataType = (DataObject) newEntityType;
    boolean defaultModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getDefaultModelId(), dataType, response);
    if (defaultModelCheck) {
        dataType.setDefaultModel(String.valueOf(jaxbDataObjectType.getDefaultModelId()));
    }
    boolean listModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getListModelId(), dataType, response);
    if (listModelCheck) {
        dataType.setListModel(String.valueOf(jaxbDataObjectType.getListModelId()));
    }
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) JAXBDataObjectType(org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType)

Aggregations

JAXBDataObjectType (org.entando.entando.aps.system.services.dataobject.api.model.JAXBDataObjectType)3 DataObject (org.entando.entando.aps.system.services.dataobject.model.DataObject)3