Package com.netflix.astyanax.model

Examples of com.netflix.astyanax.model.Composite.addComponent()


            Object component = tuple.getValueByField(rowKeyField);
            if (component == null) {
                component = "[NULL]";
            }

            keyName.addComponent(component.toString(), StringSerializer.get());
        }

        return keyName;
    }
View Full Code Here


    private Composite toKeyName(List<Object> key) {
        Composite keyName = new Composite();
        List<String> keyStrings = toKeyStrings(key);
        for (String componentString : keyStrings) {
            keyName.addComponent(componentString, StringSerializer.get());
        }
        return keyName;
    }

    private ArrayList<String> toKeyStrings(List<Object> key) {
View Full Code Here

    }

    public static Composite makeStringComposite(String... values) {
        Composite comp = new Composite();
        for (String value : values) {
            comp.addComponent(value, StringSerializer.get());
        }
        return comp;
    }

    public static Composite makeStringEqualityComposite(String[] values, ComponentEquality[] equalities) {
View Full Code Here

        if (values.length != equalities.length) {
            throw new IllegalArgumentException("Number of values and equalities must match.");
        }
        Composite comp = new Composite();
        for (int i = 0; i < values.length; i++) {
            comp.addComponent(values[i], StringSerializer.get(), equalities[i]);
        }
        return comp;
    }

    public static void main(String[] args) throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.