This operation should be kept fast as it will be called once per compile. At the moment it takes about 2.5% of the time in an incremental recompile. If wanting to recover this time in the future consider parallelizing the copy or grouping the values from hash tables with similar keys into a single data object and hashtable so that fewer references need to be replicated.
Any existing properties in this bean are lost.
This method is useful for moving from one implementation of a bean interface to another. For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
@param obj the instance to copy properties from.
Any existing properties in this bean are lost.
This method is useful for moving from one implementation of a bean interface to another. For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
@param obj the instance to copy properties from.
Any existing properties in this bean are lost.
This method is useful for moving from one implementation of a bean interface to another. For example from the default SyndFeed bean implementation to a Hibernate ready implementation.
@param obj the instance to copy properties from.
public void onGet() { Long customerId = .. Customer customer = CustomerDAO.findByPK(customerId); form.copyFrom(customer); }
copyForm also supports java.util.Map as an argument. By specifying a map, the Form's field values will be populated by matching key/value pairs. A match occurs when the map's key is equal to a field's name. The following example populates the Form fields with a map's key/value pairs: public void onInit() { form = new Form("form"); form.add(new TextField("name")); form.add(new TextField("address.street")); } public void onGet() { Map map = new HashMap(); map.put("name", "Steve"); map.put("address.street", "12 Long street"); form.copyFrom(map); }For more information on how Fields and Objects are copied see {@link org.apache.click.util.ContainerUtils#copyObjectToContainer(java.lang.Object,org.apache.click.control.Container)}. @param object the object to obtain attribute values from @throws IllegalArgumentException if the object parameter is null
This method is not transactional. If it fails and throws an exception, this file will potentially only be partially copied. @param srcFile The source file to copy. @param selector The selector to use to select which files to copy. @throws FileSystemException If this file is read-only, or if the source file does not exist,or on error copying the file.
After this call the {@link #hashCode()} return by both the specifiedobject and this object will be the same, and both objects will be {@link #equals(Object) equal}.
copyFrom
@see org.apache.jetspeed.util.FileSystemHelper#copyFrom(java.io.File) @param directory @throws IOExceptioncopyFrom
@param directory Directory to copy content from @throws {@link java.io.IlleaglArgumentException} if thedirectory.isDirectory
returns false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|