Skip to content

Commit

Permalink
fix content service
Browse files Browse the repository at this point in the history
  • Loading branch information
lh-lilahamel committed Nov 29, 2024
1 parent bf598be commit d18bde6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/com/activeviam/mac/memory/ChunkRecordHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,23 +124,19 @@ private void init(final IRecordReader record, final IDictionaryProvider dictiona
}

private int getPartition(final IRecordReader record) {
final int idx = record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARTITION_ID);
return record.readInt(idx);
return record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARTITION_ID);
}

private int getDicId(final IRecordReader record) {
final int idx = record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_DICO_ID);
return record.readInt(idx);
return record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_DICO_ID);
}

private int getIdxId(final IRecordReader record) {
final int idx = record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_INDEX_ID);
return record.readInt(idx);
return record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_INDEX_ID);
}

private int getRefId(final IRecordReader record) {
final int idx = record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_REF_ID);
return record.readInt(idx);
return record.getFormat().getFieldIndex(DatastoreConstants.CHUNK__PARENT_REF_ID);
}

private String getChunkClassName(
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/content-service-hibernate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- {@codeBlock: Override hibernate} -->
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="2.0">
<entity class="com.activeviam.tech.contentserver.storage.private_.CSEntry">
<attribute-override name="content">
<column column-definition="varchar"/>
</attribute-override>
</entity>
</entity-mappings>
<!-- {@codeBlock: Override hibernate} -->

0 comments on commit d18bde6

Please sign in to comment.