com.mobixess.jodb.util
Class PrimitiveJavaTypesUtil

java.lang.Object
  extended by com.mobixess.jodb.util.PrimitiveJavaTypesUtil

public class PrimitiveJavaTypesUtil
extends java.lang.Object


Nested Class Summary
static class PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION
           
 
Constructor Summary
PrimitiveJavaTypesUtil()
           
 
Method Summary
static int compare(boolean val, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(boolean val, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(byte val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(byte val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(char val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(char val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(double val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(double val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(float val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(float val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(int val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(int val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int compare(long val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(long val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static JODBConstants.COMPARE_RESULT compare(java.lang.Object primitiveWrapper, java.lang.reflect.Field field, java.lang.Object obj)
           
static JODBConstants.COMPARE_RESULT compare(java.lang.Object primitiveWrapper, ObjectDataContainer.FieldRecord persistentFieldRecord, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldTypeEnum)
           
static int compare(short val1, java.nio.ByteBuffer rawPrimitiveData, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
           
static int compare(short val1, java.lang.reflect.Field field, java.lang.Object obj, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
           
static int comparePrimitives(java.nio.ByteBuffer byteArrayWrapper, int byteArrayIndex, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType, java.nio.ByteBuffer singleValuePrimitive)
           
static int comparePrimitives(java.nio.ByteBuffer byteArrayWrapper, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType, java.nio.ByteBuffer singleValuePrimitive)
          use current bytebuffer positions
static int comparePrimitives(java.lang.Object value, java.nio.ByteBuffer rawPrimitiveData)
           
static int comparePrimitives(java.lang.Object value, PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType, java.nio.ByteBuffer rawPrimitiveData)
           
static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION findMutuallyAcceptibleEnumeratedType(java.lang.Class class1, java.lang.Class class2)
           
static java.lang.Object getAsWrappedPrimitive(PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType, java.nio.ByteBuffer rawPrimitiveData)
           
static int getDataOutputWriteLen(java.lang.Class primitiveClass)
           
static int getDataOutputWriteLen(java.lang.String primitiveClass)
           
static java.nio.ByteBuffer getDefaultValueAsByteBuffer(java.lang.Class clazz)
           
static java.nio.ByteBuffer getDefaultValueAsByteBuffer(java.lang.String type)
           
static java.lang.Object getDefaultWrapperInstance(PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION type)
           
static java.lang.Object getDefaultWrapperInstance(java.lang.String type)
           
static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION getEnumeratedType(int primitiveTypeID, JODBIOBase base)
           
static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION getEnumeratedType(java.lang.String primitiveClass)
           
static boolean isPrimitiveWrapper(java.lang.String className)
           
static java.lang.Class primitiveClassForName(java.lang.String name)
           
static void primitiveToByteBuffer(java.lang.Object obj, java.lang.reflect.Field field, java.nio.ByteBuffer byteBuffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrimitiveJavaTypesUtil

public PrimitiveJavaTypesUtil()
Method Detail

getDefaultWrapperInstance

public static java.lang.Object getDefaultWrapperInstance(java.lang.String type)
                                                  throws JodbIOException
Throws:
JodbIOException

getDefaultWrapperInstance

public static java.lang.Object getDefaultWrapperInstance(PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION type)
                                                  throws JodbIOException
Throws:
JodbIOException

getDefaultValueAsByteBuffer

public static java.nio.ByteBuffer getDefaultValueAsByteBuffer(java.lang.Class clazz)
                                                       throws JodbIOException
Throws:
JodbIOException

getDefaultValueAsByteBuffer

public static java.nio.ByteBuffer getDefaultValueAsByteBuffer(java.lang.String type)
                                                       throws JodbIOException
Throws:
JodbIOException

isPrimitiveWrapper

public static boolean isPrimitiveWrapper(java.lang.String className)

getDataOutputWriteLen

public static int getDataOutputWriteLen(java.lang.Class primitiveClass)
                                 throws JodbIOException
Throws:
JodbIOException

getDataOutputWriteLen

public static int getDataOutputWriteLen(java.lang.String primitiveClass)
                                 throws JodbIOException
Throws:
JodbIOException

getEnumeratedType

public static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION getEnumeratedType(java.lang.String primitiveClass)
                                                                       throws JodbIOException
Throws:
JodbIOException

getEnumeratedType

public static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION getEnumeratedType(int primitiveTypeID,
                                                                              JODBIOBase base)
                                                                       throws JodbIOException
Throws:
JodbIOException

findMutuallyAcceptibleEnumeratedType

public static PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION findMutuallyAcceptibleEnumeratedType(java.lang.Class class1,
                                                                                                 java.lang.Class class2)
                                                                                          throws JodbIOException
Throws:
JodbIOException

primitiveClassForName

public static java.lang.Class primitiveClassForName(java.lang.String name)

primitiveToByteBuffer

public static void primitiveToByteBuffer(java.lang.Object obj,
                                         java.lang.reflect.Field field,
                                         java.nio.ByteBuffer byteBuffer)
                                  throws java.lang.IllegalArgumentException,
                                         java.io.IOException
Throws:
java.lang.IllegalArgumentException
java.io.IOException

getAsWrappedPrimitive

public static java.lang.Object getAsWrappedPrimitive(PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType,
                                                     java.nio.ByteBuffer rawPrimitiveData)
                                              throws java.io.IOException
Throws:
java.io.IOException

comparePrimitives

public static int comparePrimitives(java.lang.Object value,
                                    java.nio.ByteBuffer rawPrimitiveData)
                             throws java.io.IOException
Throws:
java.io.IOException

comparePrimitives

public static int comparePrimitives(java.lang.Object value,
                                    PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType,
                                    java.nio.ByteBuffer rawPrimitiveData)
                             throws java.io.IOException
Throws:
java.io.IOException

comparePrimitives

public static int comparePrimitives(java.nio.ByteBuffer byteArrayWrapper,
                                    int byteArrayIndex,
                                    PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType,
                                    java.nio.ByteBuffer singleValuePrimitive)
                             throws java.io.IOException
Throws:
java.io.IOException

comparePrimitives

public static int comparePrimitives(java.nio.ByteBuffer byteArrayWrapper,
                                    PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION enumeratedPrimitiveType,
                                    java.nio.ByteBuffer singleValuePrimitive)
                             throws java.io.IOException
use current bytebuffer positions

Parameters:
byteArrayWrapper -
enumeratedPrimitiveType -
singleValuePrimitive -
Returns:
Throws:
java.io.IOException

compare

public static JODBConstants.COMPARE_RESULT compare(java.lang.Object primitiveWrapper,
                                                   ObjectDataContainer.FieldRecord persistentFieldRecord,
                                                   PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldTypeEnum)
                                            throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(boolean val,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(byte val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(short val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(char val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(int val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(long val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(double val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(float val1,
                          java.nio.ByteBuffer rawPrimitiveData,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION rawPrimitiveDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static JODBConstants.COMPARE_RESULT compare(java.lang.Object primitiveWrapper,
                                                   java.lang.reflect.Field field,
                                                   java.lang.Object obj)
                                            throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(boolean val,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(byte val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(char val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(short val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(int val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(long val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(float val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException

compare

public static int compare(double val1,
                          java.lang.reflect.Field field,
                          java.lang.Object obj,
                          PrimitiveJavaTypesUtil.PRIMITIVES_ENUMERATION fieldDataType)
                   throws JodbIOException
Throws:
JodbIOException


Copyright © Mobixess Inc. All Rights Reserved.