use of org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO in project entando-core by entando.
the class DataObjectManager method loadDataObject.
@Override
public DataObject loadDataObject(String id, boolean onLine, boolean cacheable) throws ApsSystemException {
DataObject dataobject = null;
try {
DataObjectRecordVO dataobjectVo = this.loadDataObjectVO(id);
dataobject = this.createDataObject(dataobjectVo, onLine);
} catch (ApsSystemException e) {
logger.error("Error while loading dataobject : id {}", id, e);
throw new ApsSystemException("Error while loading dataobject : id " + id, e);
}
return dataobject;
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO in project entando-core by entando.
the class TestDataObjectDAO method addDataObject.
private void addDataObject(DataObject mockDataObject) throws ApsSystemException {
_dataObjectDao.addEntity(mockDataObject);
DataObjectRecordVO dataObjectRecord = (DataObjectRecordVO) this._dataObjectDao.loadEntityRecord(mockDataObject.getId());
assertEquals(mockDataObject.getDescription(), dataObjectRecord.getDescription());
assertEquals(mockDataObject.getStatus(), dataObjectRecord.getStatus());
assertTrue(dataObjectRecord.isOnLine());
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO in project entando-core by entando.
the class TestDataObjectDAO method insertOnLineDataObject.
private void insertOnLineDataObject(DataObject mockDataObject) throws ApsSystemException {
this._dataObjectDao.insertDataObject(mockDataObject);
DataObjectRecordVO dataObjectRecord = (DataObjectRecordVO) this._dataObjectDao.loadEntityRecord(mockDataObject.getId());
assertTrue(dataObjectRecord.isOnLine());
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO in project entando-core by entando.
the class TestDataObjectEntityManager method verifyOrder.
private void verifyOrder(List<ApsEntityRecord> dataObjects, String[] order) {
for (int i = 0; i < dataObjects.size(); i++) {
DataObjectRecordVO vo = (DataObjectRecordVO) dataObjects.get(i);
assertEquals(order[i], vo.getId());
}
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObjectRecordVO in project entando-core by entando.
the class AbstractDataObjectSearcherDAO method createRecord.
@Override
protected ApsEntityRecord createRecord(ResultSet result) throws Throwable {
DataObjectRecordVO contentVo = new DataObjectRecordVO();
contentVo.setId(result.getString("dataid"));
contentVo.setTypeCode(result.getString("datatype"));
contentVo.setDescription(result.getString("descr"));
contentVo.setStatus(result.getString("status"));
String xmlWork = result.getString("workxml");
contentVo.setCreate(DateConverter.parseDate(result.getString("created"), this.DATE_FORMAT));
contentVo.setModify(DateConverter.parseDate(result.getString("lastmodified"), this.DATE_FORMAT));
String xmlOnLine = result.getString("onlinexml");
contentVo.setOnLine(null != xmlOnLine && xmlOnLine.length() > 0);
contentVo.setSync(xmlWork.equals(xmlOnLine));
String mainGroupCode = result.getString("maingroup");
contentVo.setMainGroupCode(mainGroupCode);
contentVo.setXmlWork(xmlWork);
contentVo.setXmlOnLine(xmlOnLine);
contentVo.setVersion(result.getString("currentversion"));
contentVo.setLastEditor(result.getString("lasteditor"));
return contentVo;
}
Aggregations