| Home >> All >> org >> apache >> commons >> [ beanutils Javadoc ] |
| | org.apache.commons.beanutils.converters.* (38) | | org.apache.commons.beanutils.locale.* (24) |
| | org.apache.commons.beanutils.locale.converters.* (15) | | org.apache.commons.beanutils.priv.* (7) |
org.apache.commons.beanutils: Javadoc index of package org.apache.commons.beanutils.
Package Samples:
org.apache.commons.beanutils.locale.converters: Standard implementations of the locale-aware LocaleConverter interface that are pre-registered with locale-aware LocaleConvertUtils at startup time.
org.apache.commons.beanutils.converters: Standard implementations of the Converter interface that are pre-registered with ConvertUtils at startup time.
org.apache.commons.beanutils.locale: Locale-aware extensions of the standard beanutils classes.
org.apache.commons.beanutils.priv
Classes:
LazyDynaBean: DynaBean which automatically adds properties to the DynaClass and provides Lazy List and Lazy Map features. DynaBeans deal with three types of properties - simple , indexed and mapped and have the following get() and set() methods for each of these types: Simple property methods - get(name) and set(name, value) Indexed property methods - get(name, index) and set(name, index, value) Mapped property methods - get(name, key) and set(name, key, value) Getting Property Values Calling any of the get() methods, for a property which doesn't exist, returns null in this implementation. Setting Simple Properties ...
BeanPropertyValueEqualsPredicate: Predicate that evaluates a property value against a specified value. An implementation of org.apache.commons.collections.Predicate that evaluates a property value on the object provided against a specified value and returns true if equal; false otherwise. The BeanPropertyValueEqualsPredicate constructor takes two parameters which determine what property will be evaluated on the target object and what its expected value should be. public BeanPropertyValueEqualsPredicate( String propertyName, Object propertyValue ) Will create a Predicate that will evaluate the target object and return true if the ...
PropertyUtilsBean: Utility methods for using Java Reflection APIs to facilitate generic property getter and setter operations on Java objects. Much of this code was originally included in BeanUtils , but has been separated because of the volume of code involved. In general, the objects that are examined and modified using these methods are expected to conform to the property getter and setter method naming conventions described in the JavaBeans Specification (Version 1.0.1). No data type conversions are performed, and there are no usage of any PropertyEditor classes that have been registered, although a convenient ...
RowSetDynaClass: Implementation of DynaClass that creates an in-memory collection of DynaBean s representing the results of an SQL query. Once the DynaClass instance has been created, the JDBC ResultSet and Statement on which it is based can be closed, and the underlying Connection can be returned to its connection pool (if you are using one). The normal usage pattern is something like: Connection conn = ...; // Acquire connection from pool Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT ..."); RowSetDynaClass rsdc = new RowSetDynaClass(rs); rs.close(); stmt.close(); ...; // Return ...
ResultSetDynaClass: Implementation of DynaClass for DynaBeans that wrap the java.sql.Row objects of a java.sql.ResultSet . The normal usage pattern is something like: ResultSet rs = ...; ResultSetDynaClass rsdc = new ResultSetDynaClass(rs); Iterator rows = rsdc.iterator(); while (rows.hasNext()) { DynaBean row = (DynaBean) rows.next(); ... process this row ... } rs.close(); Each column in the result set will be represented as a DynaBean property of the corresponding name (optionally forced to lower case for portability). WARNING - Any DynaBean instance returned by this class, or from the Iterator returned by the iterator() ...
LocaleConvertUtilsBean: Utility methods for converting locale-sensitive String scalar values to objects of the specified Class, String arrays to arrays of the specified Class and object to locale-sensitive String scalar value. This class provides the implementations used by the static utility methods in LocaleConvertUtils . The actual LocaleConverter instance to be used can be registered for each possible destination Class. Unless you override them, standard LocaleConverter instances are provided for all of the following destination Classes: java.lang.BigDecimal java.lang.BigInteger byte and java.lang.Byte double and ...
ConvertUtilsBean: Utility methods for converting String scalar values to objects of the specified Class, String arrays to arrays of the specified Class. The actual Converter instance to be used can be registered for each possible destination Class. Unless you override them, standard Converter instances are provided for all of the following destination Classes: java.lang.BigDecimal java.lang.BigInteger boolean and java.lang.Boolean byte and java.lang.Byte char and java.lang.Character java.lang.Class double and java.lang.Double float and java.lang.Float int and java.lang.Integer long and java.lang.Long short and java.lang.Short ...
BeanPropertyValueChangeClosure: Closure that sets a property. An implementation of org.apache.commons.collections.Closure that updates a specified property on the object provided with a specified value. The BeanPropertyValueChangeClosure constructor takes two parameters which determine what property will be updated and with what value. public BeanPropertyValueChangeClosure( String propertyName, Object propertyValue ) Will create a Closure that will update an object by setting the property specified by propertyName to the value specified by propertyValue . Note: Property names can be a simple, nested, indexed, or mapped property ...
BeanToPropertyValueTransformer: Transformer that outputs a property value. An implementation of org.apache.commons.collections.Transformer that transforms the object provided by returning the value of a specified property of the object. The constructor for BeanToPropertyValueTransformer requires the name of the property that will be used in the transformation. The property can be a simple, nested, indexed, or mapped property as defined by org.apache.commons.beanutils.PropertyUtils . If any object in the property path specified by propertyName is null then the outcome is based on the value of the ignoreNull attribute. A typical ...
LazyDynaMap: Provides a light weight DynaBean facade to a Map with lazy map/list processing. Its a light weight DynaBean implementation because there is no actual DynaClass associated with this DynaBean - in fact it implements the DynaClass interface itself providing pseudo DynaClass behaviour from the actual values stored in the Map . As well providing rhe standard DynaBean access to the Map 's properties this class also provides the usual Lazy behaviour: Properties don't need to be pre-defined in a DynaClass Indexed properties ( Lists or Arrays ) are automatically instantiated and grown so that they are large ...
LazyDynaClass: DynaClass which implements the MutableDynaClass interface. A MutableDynaClass is a specialized extension to DynaClass that allows properties to be added or removed dynamically. This implementation has one slightly unusual default behaviour - calling the getDynaProperty(name) method for a property which doesn't exist returns a DynaProperty rather than null . The reason for this is that BeanUtils calls this method to check if a property exists before trying to set the value. This would defeat the object of the LazyDynaBean which automatically adds missing properties when any of its set() methods ...
PropertyUtilsTestCase: Test Case for the PropertyUtils class. The majority of these tests use instances of the TestBean class, so be sure to update the tests if you change the characteristics of that class. So far, this test case has tests for the following methods of the PropertyUtils class: getIndexedProperty(Object,String) getIndexedProperty(Object,String,int) getMappedProperty(Object,String) getMappedProperty(Object,String,String getNestedProperty(Object,String) getPropertyDescriptor(Object,String) getPropertyDescriptors(Object) getPropertyType(Object,String) getSimpleProperty(Object,String) setIndexedProperty(Object,String,Object) ...
ConstructorUtils: Utility reflection methods focussed on constructors, modelled after MethodUtils . Known Limitations Accessing Public Constructors In A Default Access Superclass There is an issue when invoking public constructors contained in a default access superclass. Reflection locates these constructors fine and correctly assigns them as public. However, an IllegalAccessException is thrown if the constructors is invoked. ConstructorUtils contains a workaround for this situation. It will attempt to call setAccessible on this constructor. If this call succeeds, then the method can be invoked as normal. This ...
MethodUtils: Utility reflection methods focussed on methods in general rather than properties in particular. Known Limitations Accessing Public Methods In A Default Access Superclass There is an issue when invoking public methods contained in a default access superclass. Reflection locates these methods fine and correctly assigns them as public. However, an IllegalAccessException is thrown if the method is invoked. MethodUtils contains a workaround for this situation. It will attempt to call setAccessible on this method. If this call succeeds, then the method can be invoked as normal. This call will only succeed ...
BeanComparator: This comparator compares two beans by the specified bean property. It is also possible to compare beans based on nested, indexed, combined, mapped bean properties. Please see the PropertyUtilsBean documentation for all property name possibilities. Note: The BeanComparator passes the values of the specified bean property to a ComparableComparator, if no comparator is specified in the constructor. If you are comparing two beans based on a property that could contain "null" values, a suitable Comparator or ComparatorChain should be supplied in the constructor.
AbstractArrayConverter: Convenience base class for converters that translate the String representation of an array into a corresponding array of primitives object. This class encapsulates the functionality required to parse the String into a list of String elements that can later be individually converted to the appropriate primitive type. The input syntax accepted by the parseElements() method is designed to be compatible with the syntax used to initialize arrays in a Java source program, except that only String literal values are supported. For maximum flexibility, the surrounding '{' and '}' characters are optional, ...
BaseLocaleConverter: The base class for all standart type locale-sensitive converters. It has LocaleConverter and org.apache.commons.beanutils.Converter implementations, that convert an incoming locale-sensitive Object into an object of correspond type, optionally using a default value or throwing a org.apache.commons.beanutils.ConversionException if a conversion error occurs.
BeanUtilsTestCase: Test Case for the BeanUtils class. The majority of these tests use instances of the TestBean class, so be sure to update the tests if you change the characteristics of that class. Template for this stolen from Craigs PropertyUtilsTestCase Note that the tests are dependant upon the static aspects (such as array sizes...) of the TestBean.java class, so ensure than all changes to TestBean are reflected here. So far, this test case has tests for the following methods of the BeanUtils class: getArrayProperty(Object bean, String name)
DynaProperty: The metadata describing an individual property of a DynaBean. The meta contains an optional content type property ( getContentType() 55 ) for use by mapped and iterated properties. A mapped or iterated property may choose to indicate the type it expects. The DynaBean implementation may choose to enforce this type on its entries. Alternatively, an implementatin may choose to ignore this property. All keys for maps must be of type String so no meta data is needed for map keys.
WrapDynaBean: Implementation of DynaBean that wraps a standard JavaBean instance, so that DynaBean APIs can be used to access its properties. The most common use cases for this class involve wrapping an existing java bean. (This makes it different from the typical use cases for other DynaBean 's.) For example: Object aJavaBean = ...; ... DynaBean db = new WrapDynaBean(aJavaBean); ... IMPLEMENTATION NOTE - This implementation does not support the contains() and remove() methods.
LocaleConvertUtils: Utility methods for converting locale-sensitive String scalar values to objects of the specified Class, String arrays to arrays of the specified Class and object to locale-sensitive String scalar value. The implementations for these method are provided by LocaleConvertUtilsBean . These static utility method use the default instance. More sophisticated can be provided by using a LocaleConvertUtilsBean instance.
MappedPropertyDescriptor: A MappedPropertyDescriptor describes one mapped property. Mapped properties are multivalued properties like indexed properties but that are accessed with a String key instead of an index. Such property values are typically stored in a Map collection. For this class to work properly, a mapped value must have getter and setter methods of the form get Property (String key) and set<Property>(String key, Object value) , where Property must be replaced by the name of the property.
ClassConverter: Standard org.apache.commons.beanutils.Converter implementation that converts an incoming String into a java.lang.Class object, optionally using a default value or throwing a org.apache.commons.beanutils.ConversionException if a conversion error occurs. The class will be loaded from the thread context class loader (if it exists); otherwise the class loader that loaded this class will be used.
ConvertingWrapDynaBean: Implementation of DynaBean that wraps a standard JavaBean instance, so that DynaBean APIs can be used to access its properties, though this implementation allows type conversion to occur when properties are set. This means that (say) Strings can be passed in as values in setter methods and this DynaBean will convert them to the correct primitive data types. IMPLEMENTATION NOTE - This implementation does not support the contains() and remove() methods.
BasicDynaBean: Minimal implementation of the DynaBean interface. Can be used as a convenience base class for more sophisticated implementations. IMPLEMENTATION NOTE - Instances of this class that are accessed from multiple threads simultaneously need to be synchronized. IMPLEMENTATION NOTE - Instances of this class can be successfully serialized and deserialized ONLY if all property values are Serializable .
| Home | Contact Us | Privacy Policy | Terms of Service |