Package com.mobixess.jodb.util.PrimitiveJavaTypesUtil

Examples of com.mobixess.jodb.util.PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION


                if(handle == null || handle.getObjectEntryOffset() != fieldRecord._objectOffset){
                    return false;
                }
            }
        }else{
            PRIMITIVES_ENUMERATION enumeratedPrimitiveType = PrimitiveJavaTypesUtil.getEnumeratedType(classDescriptor.getArrayType().getName());
            for (int i = 0; i < arraySize; i++) {
                fieldsIterator.next(fieldRecord, base, false);
                Object value = Array.get(array, i);
                if( PrimitiveJavaTypesUtil.comparePrimitives(value, enumeratedPrimitiveType, fieldRecord._primitiveRawDataBuffer) != 0 ){
                    return false;
View Full Code Here


    public COMPARE_RESULT compare(byte[] value1, ObjectDataContainer value2, JODBOperationContext context,
            Field[] fieldsToIgnore, Class originalClass) throws IOException
    {
        //TODO optimize without instantiation
        PRIMITIVES_ENUMERATION enumeratedType = PrimitiveJavaTypesUtil.getEnumeratedType(originalClass.getName());
        //TODO pass enumeratedType directly to 'composeInstance'
        ByteBuffer buffer = _threadLocalBuffer.get();
        buffer.clear();
        buffer.put(value1);
        buffer.flip();
View Full Code Here

        for (int i = 0; fieldsIterator.hasNext(); ++i) {
            fieldsIterator.next(record, session.getBase(), false);
            byteBuffer.put(record._primitiveRawDataBuffer.get(0));
        }
        byteBuffer.flip();
        PRIMITIVES_ENUMERATION enumeratedType = PrimitiveJavaTypesUtil.getEnumeratedType(type.getName());
        return (Comparable) PrimitiveJavaTypesUtil.getAsWrappedPrimitive(enumeratedType, byteBuffer);
    }
View Full Code Here

            }
            if(primitiveRecord!=null){
                SortDataCache sortDataCache = context.getSortDataCache();
                if(primitiveRecord._category == FIELD_CATEGORIES.PRIMITIVE){
                    if(sortDataCache!=null){
                        PRIMITIVES_ENUMERATION fieldTypeEnum = PrimitiveJavaTypesUtil.getEnumeratedType(primitiveRecord._fieldTypeID, context.getBase());
                        sortDataCache.addSortValue(_sortingNodeId, PrimitiveJavaTypesUtil.getAsWrappedPrimitive(fieldTypeEnum, primitiveRecord._primitiveRawDataBuffer));
                    }
                }else if(primitiveRecord._fieldTypeName.equals(String.class.getName())){//TODO check for enum?
                    Object value = TransactionUtils.launchObject(context.getSession(), primitiveRecord._objectOffset , null, 1);
                    sortDataCache.addSortValue(_sortingNodeId, value);
View Full Code Here

            if(record!=null && record._category == FIELD_CATEGORIES.PRIMITIVE){
                COMPARE_RESULT compareResult;
                if(!PrimitiveJavaTypesUtil.isPrimitiveWrapper(originClass)){
                    compareResult = COMPARE_RESULT.UNKNOWN;
                }else{
                    PRIMITIVES_ENUMERATION fieldTypeEnum = PrimitiveJavaTypesUtil.getEnumeratedType(record._fieldTypeID, context.getBase());
                    compareResult = PrimitiveJavaTypesUtil.compare(_constraintOrigin, record, fieldTypeEnum);
                }
                processCompareResult(compareResult);
                return;
            }
View Full Code Here

       
        @Override
        void evaluatePersistentCopy(ClassDescriptor classDescriptor, ObjectDataContainer dataContainer, FieldRecord record, JODBOperationContext context) throws IOException
        {
            if(record!=null && record._category == FIELD_CATEGORIES.PRIMITIVE){
                PRIMITIVES_ENUMERATION fieldTypeEnum = PrimitiveJavaTypesUtil.getEnumeratedType(record._fieldTypeID, context.getBase());
                Object obj = PrimitiveJavaTypesUtil.getAsWrappedPrimitive(fieldTypeEnum,record._primitiveRawDataBuffer);
                evaluateActiveObject(obj, null, context);
                return;
            }
            if(dataContainer!=null){
View Full Code Here

            int returnOpcode = -1;
            if(!fieldTypeClass.isPrimitive()){
                returnOpcode = Opcodes.ARETURN;
            }else{
                try {
                    PRIMITIVES_ENUMERATION primitives_enumeration = PrimitiveJavaTypesUtil.getEnumeratedType(fieldTypeClass.getName());
                    switch (primitives_enumeration) {
                        case _long:
                            returnOpcode = Opcodes.LRETURN;
                            break;
                        case _double:
View Full Code Here

TOP

Related Classes of com.mobixess.jodb.util.PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION

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.