Package org.apache.openjpa.util

Examples of org.apache.openjpa.util.ByteId


        Class cls = meta.getDescribedType();
        if (meta.getIdentityType() == ClassMetaData.ID_DATASTORE)
            return new Id(cls, ((Number) oid).longValue());

        if (oid instanceof Byte)
            return new ByteId(cls, (Byte) oid);
        if (oid instanceof Character)
            return new CharId(cls, (Character) oid);
        if (oid instanceof Double)
            return new DoubleId(cls, (Double) oid);
        if (oid instanceof Float)
View Full Code Here


        if (pks.length > 0) {
            Class<?> pkType = pks[0].getDeclaredType();
            try {
                // Check for basic types, cast provided object to expected type. Catch CCE for invalid input
                if (pkType.equals(Byte.class) || pkType.equals(byte.class))
                    return new ByteId(cls, (Byte) oid);
                if (pkType.equals(Character.class) || pkType.equals(char.class))
                    return new CharId(cls, (Character) oid);
                if (pkType.equals(Double.class) || pkType.equals(double.class))
                    return new DoubleId(cls, (Double) oid);
                if (pkType.equals(Float.class) || pkType.equals(float.class))
View Full Code Here

        if (pks.length > 0) {
            Class<?> pkType = pks[0].getDeclaredType();
            try {
                // Check for basic types, cast provided object to expected type. Catch CCE for invalid input
                if (pkType.equals(Byte.class) || pkType.equals(byte.class))
                    return new ByteId(cls, (Byte) oid);
                if (pkType.equals(Character.class) || pkType.equals(char.class))
                    return new CharId(cls, (Character) oid);
                if (pkType.equals(Double.class) || pkType.equals(double.class))
                    return new DoubleId(cls, (Double) oid);
                if (pkType.equals(Float.class) || pkType.equals(float.class))
View Full Code Here

        Class cls = meta.getDescribedType();
        if (meta.getIdentityType() == ClassMetaData.ID_DATASTORE)
            return new Id(cls, ((Number) oid).longValue());

        if (oid instanceof Byte)
            return new ByteId(cls, (Byte) oid);
        if (oid instanceof Character)
            return new CharId(cls, (Character) oid);
        if (oid instanceof Double)
            return new DoubleId(cls, (Double) oid);
        if (oid instanceof Float)
View Full Code Here

        Class cls = meta.getDescribedType();
        if (meta.getIdentityType() == ClassMetaData.ID_DATASTORE)
            return new Id(cls, ((Number) oid).longValue());

        if (oid instanceof Byte)
            return new ByteId(cls, (Byte) oid);
        if (oid instanceof Character)
            return new CharId(cls, (Character) oid);
        if (oid instanceof Double)
            return new DoubleId(cls, (Double) oid);
        if (oid instanceof Float)
View Full Code Here

        Class cls = meta.getDescribedType();
        if (meta.getIdentityType() == ClassMetaData.ID_DATASTORE)
            return new Id(cls, ((Number) oid).longValue());

        if (oid instanceof Byte)
            return new ByteId(cls, (Byte) oid);
        if (oid instanceof Character)
            return new CharId(cls, (Character) oid);
        if (oid instanceof Double)
            return new DoubleId(cls, (Double) oid);
        if (oid instanceof Float)
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.ByteId

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.