case RELATIVELY_ADDRESSED:
record._objectOffset = _input.readInt()+_input.getCursorOffset();
break;
case PRIMITIVE:
record._primitiveRawDataBuffer.clear();
IndexingRecord indexingRecord = IndexingRecord.findIndexingRecord(record._fieldID, _indexes);
if (unfoldPrimitive) {
Object value;
if( indexingRecord!=null ){
int dataLen = PrimitiveJavaTypesUtil.getDataOutputWriteLen(record._fieldTypeName);
record._primitiveRawDataBuffer.limit(dataLen);
ByteBuffer buffer = indexingRecord.getPersistedDataBuffer();
_input.getChannel().read(buffer);
buffer.flip();
value = PrimitiveJavaTypesUtil.getAsWrappedPrimitive( PrimitiveJavaTypesUtil.getEnumeratedType(record._fieldTypeName) , buffer);
_processedIndexes++;
}else{
value = Utils.readPrimitive(record._fieldTypeName, _input);
}
record._value = value;
}else{
int dataLen = PrimitiveJavaTypesUtil.getDataOutputWriteLen(record._fieldTypeName);
record._primitiveRawDataBuffer.limit(dataLen);
_input.getChannel().read(record._primitiveRawDataBuffer);
record._primitiveRawDataBuffer.flip();
if( indexingRecord!=null ){
indexingRecord.setPersistedDataBufferValue(record._primitiveRawDataBuffer);
record._primitiveRawDataBuffer.rewind();
_processedIndexes++;
}
}
}
_remainingPersistentFieldsInCategory--;
checkNextCategoryNeed();
if(_translatedClassDescriptor!=null){
int fieldIndex = _translatedClassDescriptor.getFieldIndexForID(record._fieldID);
if(fieldIndex == -1){//field doesn't exist in class definition
record.clear();
continue;
}else{
_unprocessedFields.clear(fieldIndex);
}
}
validRecord = true;
break;
}
if(!validRecord && _translatedClassDescriptor != null){
int nextUnrocessedIndex = _unprocessedFields.nextSetBit(0);
if(nextUnrocessedIndex == -1){
throw new JodbIOException("nextUnrocessedIndex == -1)");
}
FieldAndIDRecord fieldAndIDRecord = _translatedClassDescriptor.getAllFields()[nextUnrocessedIndex];
Class fieldType = fieldAndIDRecord._field.getType();
record._fieldID = fieldAndIDRecord._id;
IndexingRecord indexingRecord = IndexingRecord.findIndexingRecord(record._fieldID, _indexes);
record._fieldTypeName = fieldType.getName();
record._fieldTypeID = base.getOrSetClassTypeSubstitutionID( record._fieldTypeName );
if(fieldType.isPrimitive()){
record._category = FIELD_CATEGORIES.PRIMITIVE;
if(unfoldPrimitive){
record._value = PrimitiveJavaTypesUtil.getDefaultWrapperInstance(record._fieldTypeName);
}else{
int dataLen = PrimitiveJavaTypesUtil.getDataOutputWriteLen(record._fieldTypeName);
record._primitiveRawDataBuffer.limit(dataLen);
record._primitiveRawDataBuffer.put(AUXILIARY_MAX_PRIMITIVE_CLEAN_ARRAY,0,dataLen);
record._primitiveRawDataBuffer.flip();
}
if(indexingRecord!=null){
indexingRecord.setPersistedDataBufferValue(PrimitiveJavaTypesUtil.getDefaultValueAsByteBuffer(record._fieldTypeName));
_processedIndexes++;
}
}else{
record._category = FIELD_CATEGORIES.RELATIVELY_ADDRESSED;
record._objectOffset = 0;