Package org.datanucleus.store.types

Examples of org.datanucleus.store.types.ObjectLongConverter


            return;
        }

        ObjectStringConverter strConv =
            ec.getNucleusContext().getTypeManager().getStringConverter(value.getClass());
        ObjectLongConverter longConv =
            ec.getNucleusContext().getTypeManager().getLongConverter(value.getClass());
        if (strConv != null)
        {
            // Persist as a String
            String strValue = strConv.toString(value);
            dbObject.put(fieldName, strValue);
        }
        else if (longConv != null)
        {
            // Persist as a Long
            Long longValue = longConv.toLong(value);
            dbObject.put(fieldName, longValue);
        }
        else
        {
            dbObject.put(fieldName, value);
View Full Code Here


            return cal;
        }

        ObjectStringConverter strConv =
            ec.getNucleusContext().getTypeManager().getStringConverter(mmd.getType());
        ObjectLongConverter longConv =
            ec.getNucleusContext().getTypeManager().getLongConverter(mmd.getType());
        Object returnValue = value;
        if (strConv != null)
        {
            // Persisted as a String, so convert back
            String strValue = (String)value;
            returnValue = strConv.toObject(strValue);
        }
        else if (longConv != null)
        {
            // Persisted as a Long, so convert back
            Long longValue = (Long)value;
            returnValue = longConv.toObject(longValue);
        }

        if (sm != null)
        {
            // Wrap if SCO
View Full Code Here

TOP

Related Classes of org.datanucleus.store.types.ObjectLongConverter

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.