Search in sources :

Example 6 with DataObjectRecordVO

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

the class DataObjectDAO method createEntityRecord.

@Override
protected ApsEntityRecord createEntityRecord(ResultSet res) throws Throwable {
    DataObjectRecordVO dataobjectVo = new DataObjectRecordVO();
    dataobjectVo.setId(res.getString(1));
    dataobjectVo.setTypeCode(res.getString(2));
    dataobjectVo.setDescription(res.getString(3));
    dataobjectVo.setStatus(res.getString(4));
    String xmlWork = res.getString(5);
    dataobjectVo.setCreate(DateConverter.parseDate(res.getString(6), JacmsSystemConstants.CONTENT_METADATA_DATE_FORMAT));
    dataobjectVo.setModify(DateConverter.parseDate(res.getString(7), JacmsSystemConstants.CONTENT_METADATA_DATE_FORMAT));
    String xmlOnLine = res.getString(8);
    dataobjectVo.setOnLine(null != xmlOnLine && xmlOnLine.length() > 0);
    dataobjectVo.setSync(xmlWork.equals(xmlOnLine));
    String mainGroupCode = res.getString(9);
    dataobjectVo.setMainGroupCode(mainGroupCode);
    dataobjectVo.setXmlWork(xmlWork);
    dataobjectVo.setXmlOnLine(xmlOnLine);
    dataobjectVo.setVersion(res.getString(10));
    dataobjectVo.setFirstEditor(res.getString(11));
    dataobjectVo.setLastEditor(res.getString(12));
    return dataobjectVo;
}
Also used : DataObjectRecordVO(org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)

Example 7 with DataObjectRecordVO

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

the class DataObjectManager method reloadEntityReferences.

@Override
public void reloadEntityReferences(String entityId) {
    try {
        DataObjectRecordVO dataobjectVo = this.loadDataObjectVO(entityId);
        DataObject dataobject = this.createDataObject(dataobjectVo, true);
        if (dataobject != null) {
            this.getDataObjectDAO().reloadDataObjectReferences(dataobject);
        }
        logger.debug("Reloaded dataobject references for dataobject {}", entityId);
    } catch (Throwable t) {
        logger.error("Error while reloading dataobject references for dataobject {}", entityId, t);
    }
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) DataObjectRecordVO(org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)

Example 8 with DataObjectRecordVO

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

the class TestDataObjectDAO method updateDataObject.

private void updateDataObject(DataObject mockDataObject) throws ApsSystemException {
    this._dataObjectDao.updateEntity(mockDataObject);
    DataObjectRecordVO dataObjectRecord = (DataObjectRecordVO) this._dataObjectDao.loadEntityRecord(mockDataObject.getId());
    assertEquals(mockDataObject.getDescription(), dataObjectRecord.getDescription());
    assertEquals(mockDataObject.getStatus(), dataObjectRecord.getStatus());
    assertTrue(dataObjectRecord.isOnLine());
}
Also used : DataObjectRecordVO(org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)

Example 9 with DataObjectRecordVO

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

the class TestDataObjectDAO method deleteDataObject.

private void deleteDataObject(DataObject dataObject) throws ApsSystemException {
    this._dataObjectDao.deleteEntity(dataObject.getId());
    DataObjectRecordVO dataObjectRecord = (DataObjectRecordVO) this._dataObjectDao.loadEntityRecord(dataObject.getId());
    assertNull(dataObjectRecord);
}
Also used : DataObjectRecordVO(org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)

Example 10 with DataObjectRecordVO

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

the class TestDataObjectDAO method removeOnLineDataObject.

private void removeOnLineDataObject(DataObject dataObject) throws ApsSystemException {
    this._dataObjectDao.removeDataObject(dataObject);
    DataObjectRecordVO dataObjectRecord = (DataObjectRecordVO) this._dataObjectDao.loadEntityRecord(dataObject.getId());
    assertFalse(dataObjectRecord.isOnLine());
}
Also used : DataObjectRecordVO(org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)

Aggregations

DataObjectRecordVO (org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO)10 DataObject (org.entando.entando.aps.system.services.dataobject.model.DataObject)2 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)1