gldapo.schema.attribute.type
Class DefaultTypeMappings

java.lang.Object
  extended by gldapo.schema.attribute.type.DefaultTypeMappings

public class DefaultTypeMappings
extends Object


Constructor Summary
DefaultTypeMappings()
           
 
Method Summary
 MetaClass getMetaClass()
           
 Object getProperty(String name)
           
 Object invokeMethod(String name, Object args)
           
static Object mapFromBooleanType(Object value)
           
static Object mapFrombyteArrayType(Object value)
           
static Object mapFromByteArrayType(Object value)
           
static Object mapFromDistinguishedNameType(Object value)
           
static Object mapFromFloatType(Object value)
           
static Object mapFromIntegerType(Object value)
           
static Object mapFromLongType(Object value)
           
static Object mapFromShortType(Object value)
           
static Object mapFromStringType(Object value)
           
static Object mapToBigDecimalType(Object value)
          Default type mapping for Decimal type Uses new Decimal(String) to convert.
static Object mapToBigIntegerType(Object value)
          Default type mapping for BigInteger type Uses new BigInteger(String) to convert.
static Object mapToBooleanType(Object value)
           
static Object mapTobyteArrayType(Object value)
           
static Object mapToByteArrayType(Object value)
           
static Object mapToDistinguishedNameType(Object value)
           
static Object mapToDoubleType(Object value)
          Default type mapping for Double type Uses new Double(String) to convert.
static Object mapToFloatType(Object value)
          Default type mapping for Float type Uses new Float(String) to convert.
static Object mapToIntegerType(Object value)
          Default type mapping for Integer type Uses new Integer(String) to convert.
static Object mapToLongType(Object value)
          Default type mapping for Long type Uses new Long(String) to convert.
static Object mapToShortType(Object value)
          Default type mapping for Short type Uses new Short(String) to convert.
static Object mapToStringType(Object value)
          Default type mapping for String type
 void setMetaClass(MetaClass metaClass)
           
 void setProperty(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTypeMappings

public DefaultTypeMappings()
Method Detail

mapToStringType

public static Object mapToStringType(Object value)
Default type mapping for String type

Parameters:
value - The string representation
Returns:
The exact same value that was passed in

mapFromStringType

public static Object mapFromStringType(Object value)

mapTobyteArrayType

public static Object mapTobyteArrayType(Object value)

mapFrombyteArrayType

public static Object mapFrombyteArrayType(Object value)

mapToByteArrayType

public static Object mapToByteArrayType(Object value)

mapFromByteArrayType

public static Object mapFromByteArrayType(Object value)

mapToIntegerType

public static Object mapToIntegerType(Object value)
                               throws NumberFormatException
Default type mapping for Integer type Uses new Integer(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into an Integer

mapFromIntegerType

public static Object mapFromIntegerType(Object value)

mapToBigIntegerType

public static Object mapToBigIntegerType(Object value)
                                  throws NumberFormatException
Default type mapping for BigInteger type Uses new BigInteger(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a BigInteger

mapToBigDecimalType

public static Object mapToBigDecimalType(Object value)
                                  throws NumberFormatException
Default type mapping for Decimal type Uses new Decimal(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a Decimal

mapToDoubleType

public static Object mapToDoubleType(Object value)
                              throws NumberFormatException
Default type mapping for Double type Uses new Double(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a Double

mapToFloatType

public static Object mapToFloatType(Object value)
                             throws NumberFormatException
Default type mapping for Float type Uses new Float(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a Float

mapFromFloatType

public static Object mapFromFloatType(Object value)

mapToLongType

public static Object mapToLongType(Object value)
                            throws NumberFormatException
Default type mapping for Long type Uses new Long(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a Long

mapFromLongType

public static Object mapFromLongType(Object value)

mapToShortType

public static Object mapToShortType(Object value)
                             throws NumberFormatException
Default type mapping for Short type Uses new Short(String) to convert.

Parameters:
value - The string representation
Returns:
The exact same value that was passed in
Throws:
NumberFormatException - if the string can't be converted into a Short

mapFromShortType

public static Object mapFromShortType(Object value)

mapToDistinguishedNameType

public static Object mapToDistinguishedNameType(Object value)

mapFromDistinguishedNameType

public static Object mapFromDistinguishedNameType(Object value)

mapToBooleanType

public static Object mapToBooleanType(Object value)

mapFromBooleanType

public static Object mapFromBooleanType(Object value)

getMetaClass

public MetaClass getMetaClass()

setMetaClass

public void setMetaClass(MetaClass metaClass)

invokeMethod

public Object invokeMethod(String name,
                           Object args)

getProperty

public Object getProperty(String name)

setProperty

public void setProperty(String name,
                        Object value)


Copyright © 2007-2010 Codehaus. All Rights Reserved.