use of org.apache.ofbiz.entity.GenericResultSetClosedException in project ofbiz-framework by apache.
the class EntityListIterator method currentGenericValue.
/**
* NOTE: Calling this method does return the current value, but so does calling next() or previous()
* So calling one of those AND this method will cause the value to be created twice.
*/
public GenericValue currentGenericValue() throws GenericEntityException {
if (closed)
throw new GenericResultSetClosedException("This EntityListIterator has been closed, this operation cannot be performed");
GenericValue value = GenericValue.create(modelEntity);
value.setDelegator(this.delegator);
for (int j = 0; j < selectFields.size(); j++) {
ModelField curField = selectFields.get(j);
SqlJdbcUtil.getValue(resultSet, j + 1, curField, value, modelFieldTypeReader);
}
value.synchronizedWithDatasource();
this.haveMadeValue = true;
return value;
}
Aggregations