| java.lang.Object net.sf.persist.tests.framework.DynamicBean
DynamicBean | public class DynamicBean (Code) | | Set of helpers to build and manipulate beans at runtime.
|
Method Summary | |
public static boolean | compareBeans(Object o1, Object o2) | public static boolean | compareBeansFromDifferentClasses(Object o1, Object o2) | public static boolean | compareValues(Object v1, Object v2) | public static Object | convertToType(Class cls, Object value) Try to convert the provided object to the provided class. | public static Class | createBeanClass(BeanMap beanMap, boolean noTable) | public static Object | createInstance(Class cls, BeanMap beanMap, boolean useNulls) | public static Object | getFieldValue(Object obj, String fieldName) | public static boolean | isNull(Class cls, Object obj) | public static boolean | randomBoolean() | public static byte | randomByte(byte min, byte max) | public static byte[] | randomByteArray(int size) | public static Byte[] | randomByteObjArray(int size) | public static char | randomChar() | public static char[] | randomCharArray(int size) | public static Character[] | randomCharObjArray(int size) | public static double | randomDouble(double min, double max) | public static float | randomFloat(float min, float max) | public static int | randomInt(int min, int max) | public static long | randomLong(long min, long max) | public static short | randomShort(short min, short max) | public static String | randomString(int size) | public static long | randomTimestamp() | public static byte[] | readInputStream(InputStream is) | public static String | readReader(Reader r) | public static String | toString(Object obj) |
compareBeansFromDifferentClasses | public static boolean compareBeansFromDifferentClasses(Object o1, Object o2)(Code) | | |
compareValues | public static boolean compareValues(Object v1, Object v2)(Code) | | Compare values trying to convert types if they are found to be compatible
|
convertToType | public static Object convertToType(Class cls, Object value)(Code) | | Try to convert the provided object to the provided class.
The following groups of types allow for conversion among their types:
{ String, char, Character, char[], Character[], Reader }
{ byte[], Byte[], InputStream }
{ boolean, Boolean }
{ byte, Byte, short, Short, int, Integer, long, Long, float, Float, double, Double, BigDecimal }
{ java.sql.Timestamp, java.sql.Date, java.sql.Time, java.util.Date }
|
createBeanClass | public static Class createBeanClass(BeanMap beanMap, boolean noTable)(Code) | | |
isNull | public static boolean isNull(Class cls, Object obj)(Code) | | Returns true if the field is a primitive number type (byte, short, int, etc.) and its value is zero,
or if the field is an object and its value is null
|
randomBoolean | public static boolean randomBoolean()(Code) | | |
randomByte | public static byte randomByte(byte min, byte max)(Code) | | |
randomByteArray | public static byte[] randomByteArray(int size)(Code) | | |
randomByteObjArray | public static Byte[] randomByteObjArray(int size)(Code) | | |
randomChar | public static char randomChar()(Code) | | |
randomCharArray | public static char[] randomCharArray(int size)(Code) | | |
randomCharObjArray | public static Character[] randomCharObjArray(int size)(Code) | | |
randomDouble | public static double randomDouble(double min, double max)(Code) | | |
randomFloat | public static float randomFloat(float min, float max)(Code) | | |
randomInt | public static int randomInt(int min, int max)(Code) | | |
randomLong | public static long randomLong(long min, long max)(Code) | | |
randomShort | public static short randomShort(short min, short max)(Code) | | |
randomString | public static String randomString(int size)(Code) | | |
randomTimestamp | public static long randomTimestamp()(Code) | | |
|
|