Package org.apache.ddlutils.util

Examples of org.apache.ddlutils.util.MultiInstanceofPredicate


     * @param changeTypes The types to search for
     * @param closure     The closure to invoke
     */
    protected void applyForSelectedChanges(Collection changes, Class[] changeTypes, final Closure closure)
    {
        final Predicate predicate = new MultiInstanceofPredicate(changeTypes);

        // basically we filter the changes for all objects where the above predicate
        // returns true, and for these filtered objects we invoke the given closure
        CollectionUtils.filter(changes,
                               new Predicate()
                               {
                                   public boolean evaluate(Object obj)
                                   {
                                       if (predicate.evaluate(obj))
                                       {
                                           closure.execute(obj);
                                           return false;
                                       }
                                       else
View Full Code Here


        applyForSelectedChanges(changes,
                                new Class[] { RemoveTableChange.class },
                                callbackClosure);

        // 3rd pass: changing the structure of tables
        Predicate predicate = new MultiInstanceofPredicate(new Class[] { RemovePrimaryKeyChange.class,
                                                                         AddPrimaryKeyChange.class,
                                                                         PrimaryKeyChange.class,
                                                                         RemoveColumnChange.class,
                                                                         AddColumnChange.class,
                                                                         ColumnOrderChange.class,
View Full Code Here

TOP

Related Classes of org.apache.ddlutils.util.MultiInstanceofPredicate

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.