Package com.persistit.encoding

Examples of com.persistit.encoding.KeyCoder


        if (cl == BigDecimal.class) {
            return appendBigDecimal((BigDecimal) object);
        }

        final KeyCoder coder = _persistit.lookupKeyCoder(cl);
        if (coder != null) {
            return appendByKeyCoder(object, cl, coder, context);
        }

        throw new ConversionException("Object class " + object.getClass().getName() + " can't be used in a Key");
View Full Code Here


            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            if (clazz == null) {
                throw new ConversionException("No class information for handle " + handle);
            }
            final KeyCoder coder = _persistit.lookupKeyCoder(clazz);
            if (coder == null) {
                throw new ConversionException("No KeyCoder for class " + clazz.getName());
            }
            zeroByteFree = coder.isZeroByteFree();
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            _size = index + segmentSize;
            unquoted = true;
            if (target == null) {
                return coder.decodeKeySegment(this, clazz, context);
            } else {
                if (coder instanceof KeyRenderer) {
                    ((KeyRenderer) coder).renderKeySegment(this, target, clazz, context);
                    return target;
                } else {
View Full Code Here

        boolean unquoted = false;
        boolean zeroByteFree = false;
        try {
            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            KeyCoder coder = null;
            if (clazz == null) {
                Util.append(sb, "(?handle=");
                Util.append(sb, Integer.toString(handle));
                Util.append(sb, ")");
            } else {
                Util.append(sb, "(");
                Util.append(sb, clazz.getName());
                Util.append(sb, ")");
                coder = _persistit.lookupKeyCoder(clazz);
                zeroByteFree = coder.isZeroByteFree();
            }
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            unquoted = true;
View Full Code Here

        if (cl == BigDecimal.class) {
            return appendBigDecimal((BigDecimal) object);
        }

        final KeyCoder coder = _persistit.lookupKeyCoder(cl);
        if (coder != null) {
            return appendByKeyCoder(object, cl, coder, context);
        }

        throw new ConversionException("Object class " + object.getClass().getName() + " can't be used in a Key");
View Full Code Here

            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            if (clazz == null) {
                throw new ConversionException("No class information for handle " + handle);
            }
            final KeyCoder coder = _persistit.lookupKeyCoder(clazz);
            if (coder == null) {
                throw new ConversionException("No KeyCoder for class " + clazz.getName());
            }
            zeroByteFree = coder.isZeroByteFree();
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            _size = index + segmentSize;
            unquoted = true;
            if (target == null) {
                return coder.decodeKeySegment(this, clazz, context);
            } else {
                if (coder instanceof KeyRenderer) {
                    ((KeyRenderer) coder).renderKeySegment(this, target, clazz, context);
                    return target;
                } else {
View Full Code Here

        boolean unquoted = false;
        boolean zeroByteFree = false;
        try {
            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            KeyCoder coder = null;
            if (clazz == null) {
                Util.append(sb, "(?handle=");
                Util.append(sb, Integer.toString(handle));
                Util.append(sb, ")");
            } else {
                Util.append(sb, "(");
                Util.append(sb, clazz.getName());
                Util.append(sb, ")");
                coder = _persistit.lookupKeyCoder(clazz);
                zeroByteFree = coder.isZeroByteFree();
            }
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            unquoted = true;
View Full Code Here

        if (cl == BigDecimal.class) {
            return appendBigDecimal((BigDecimal) object);
        }

        final KeyCoder coder = _persistit.lookupKeyCoder(cl);
        if (coder != null) {
            return appendByKeyCoder(object, cl, coder, context);
        }

        throw new ConversionException("Object class " + object.getClass().getName() + " can't be used in a Key");
View Full Code Here

            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            if (clazz == null) {
                throw new ConversionException("No class information for handle " + handle);
            }
            final KeyCoder coder = _persistit.lookupKeyCoder(clazz);
            if (coder == null) {
                throw new ConversionException("No KeyCoder for class " + clazz.getName());
            }
            zeroByteFree = coder.isZeroByteFree();
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            _size = index + segmentSize;
            unquoted = true;
            if (target == null) {
                return coder.decodeKeySegment(this, clazz, context);
            } else {
                if (coder instanceof KeyRenderer) {
                    ((KeyRenderer) coder).renderKeySegment(this, target, clazz, context);
                    return target;
                } else {
View Full Code Here

        boolean unquoted = false;
        boolean zeroByteFree = false;
        try {
            final int handle = decodeHandle();
            clazz = _persistit.classForHandle(handle);
            KeyCoder coder = null;
            if (clazz == null) {
                Util.append(sb, "(?handle=");
                Util.append(sb, Integer.toString(handle));
                Util.append(sb, ")");
            } else {
                Util.append(sb, "(");
                Util.append(sb, clazz.getName());
                Util.append(sb, ")");
                coder = _persistit.lookupKeyCoder(clazz);
                zeroByteFree = coder.isZeroByteFree();
            }
            segmentSize = unquoteNulls(index, zeroByteFree);
            size = _size;
            unquoted = true;
View Full Code Here

        if (cl == BigDecimal.class) {
            return appendBigDecimal((BigDecimal) object);
        }

        KeyCoder coder = _persistit.lookupKeyCoder(cl);
        if (coder != null) {
            return appendByKeyCoder(object, cl, coder, context);
        }

        throw new ConversionException("Object class " + object.getClass().getName() + " can't be used in a Key");
View Full Code Here

TOP

Related Classes of com.persistit.encoding.KeyCoder

Copyright © 2018 www.massapicom. 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.