Search in sources :

Example 16 with NameComponentDescription

use of com.palantir.atlasdb.table.description.NameComponentDescription in project atlasdb by palantir.

the class RowOrDynamicColumnRenderer method renderParameterList.

private void renderParameterList(List<NameComponentDescription> components) {
    lineEnd("(");
    for (NameComponentDescription comp : components.subList(0, components.size())) {
        lineEnd(typeName(comp), " ", varName(comp), ", ");
    }
    replace(", ", ")");
}
Also used : NameComponentDescription(com.palantir.atlasdb.table.description.NameComponentDescription)

Example 17 with NameComponentDescription

use of com.palantir.atlasdb.table.description.NameComponentDescription in project atlasdb by palantir.

the class RowOrDynamicColumnRenderer method renderComputeFirstNComponentHash.

private void renderComputeFirstNComponentHash(int numberOfComponentsHashed) {
    List<NameComponentDescription> components = getRowPartsWithoutHash().subList(0, numberOfComponentsHashed);
    List<String> vars = Lists.newArrayList();
    for (NameComponentDescription comp : components) {
        vars.add(varName(comp));
    }
    line("long ", NameMetadataDescription.HASH_ROW_COMPONENT_NAME, " = computeHashFirstComponents(", Joiner.on(", ").join(vars), ");");
}
Also used : NameComponentDescription(com.palantir.atlasdb.table.description.NameComponentDescription)

Aggregations

NameComponentDescription (com.palantir.atlasdb.table.description.NameComponentDescription)17 MethodSpec (com.squareup.javapoet.MethodSpec)4 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 RangeRequest (com.palantir.atlasdb.keyvalue.api.RangeRequest)2 BatchingVisitableView (com.palantir.common.base.BatchingVisitableView)2 ImmutableList (com.google.common.collect.ImmutableList)1 Lists (com.google.common.collect.Lists)1 RowResult (com.palantir.atlasdb.keyvalue.api.RowResult)1 ValueByteOrder (com.palantir.atlasdb.protos.generated.TableMetadataPersistence.ValueByteOrder)1 NameMetadataDescription (com.palantir.atlasdb.table.description.NameMetadataDescription)1 ValueType (com.palantir.atlasdb.table.description.ValueType)1 Persistables (com.palantir.common.persist.Persistables)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 SortedMap (java.util.SortedMap)1 Collectors (java.util.stream.Collectors)1