class DataStorageDao extends NamedParameterJdbcDaoSupport {

    @Transactional(propagation = Propagation.MANDATORY)
    public void createDataStorage(AbstractDataStorage dataStorage) {
        dataStorage.setId(createDataStorageId());
        if (dataStorage.getCreatedDate() == null) {
            dataStorage.setCreatedDate(DateUtils.now());
        }
        getNamedParameterJdbcTemplate().update(createDataStorageQuery,
                DataStorageParameters.getParameters(dataStorage));
    }

}