Package org.apache.commons.collections

Examples of org.apache.commons.collections.Predicate


                     * A map cointaining a cache of value objects under generation: It will be used for detect when overlapping
                     * value-objects are trying to be generated
                     */
                    final Map vObjsNames = new HashMap();
                    tamperedMetadata = CollectionUtils.select(newMetadata,
                            new Predicate() {
                                public boolean evaluate(Object arg0) {
                                    JavaClass javaClass = (JavaClass) arg0;
                                    boolean retVal = true;

                                    if (vObjPlugin.shouldGenerate(javaClass)) {
View Full Code Here


         * @return The list of found relations (empty array if not found)
         * @return The found relation or null if not found
         */
        public Relation[] getRelationsFor(final JavaMethod method) {
            Collection retLst = CollectionUtils.select(Arrays.asList(getRelations()),
                    new Predicate() {
                        public boolean evaluate(Object arg0) {
                            Relation current = (Relation) arg0;
                            boolean isFound;
                            isFound = (current.getLeftMethod() != null) && current.getLeftMethod().equals(method);
                            isFound = isFound ||
View Full Code Here

        if (!isCMP(clazz)) {
            return null;
        }

        return CollectionUtils.select(Arrays.asList(clazz.getMethods(true)),
            new Predicate() {
                public boolean evaluate(Object object) {
                    int methodFlags = getMethodMetadata((JavaMethod) object);
                    return hasFlag(methodFlags, METADATA_METHOD_PERSISTENCE_FIELD);

                    /*
 
View Full Code Here

     * @return An RelationManager
     */
    public RelationManager createRelationManager(Collection metadata) {
        // Select concrete CMP Beans
        Collection cmpBeans = CollectionUtils.select(getBeans(metadata, BEAN_CMP),
                new Predicate() {
                    public boolean evaluate(Object arg0) {
                        JavaClass javaClass = (JavaClass) arg0;
                        boolean retVal = shouldGenerate(javaClass);

                        if (log.isDebugEnabled()) {
View Full Code Here

     * @see org.andromda.metafacades.uml.EntityFacade#getBusinessOperations()
     */
    protected Collection handleGetBusinessOperations()
    {
        Collection operations = super.getOperations();
        CollectionUtils.filter(operations, new Predicate()
        {
            public boolean evaluate(Object object)
            {
                boolean businessOperation = false;
                if (EJBOperationFacade.class.isAssignableFrom(object.getClass()))
View Full Code Here

     */
    protected boolean handleIsChild()
    {
        return CollectionUtils.find(
            this.getAssociationEnds(),
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    return ((AssociationEndFacade)object).getOtherEnd().isComposition();
                }
View Full Code Here

    {
        Object parentEnd = null;
        final AssociationEndFacade end =
            (AssociationEndFacade)CollectionUtils.find(
                this.getAssociationEnds(),
                new Predicate()
                {
                    public boolean evaluate(Object object)
                    {
                        return ((AssociationEndFacade)object).getOtherEnd().isComposition();
                    }
View Full Code Here

        final boolean withIdentifiers)
    {
        final Collection attributes = this.getAttributes(follow);
        CollectionUtils.filter(
            attributes,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid = true;
                    if (!withIdentifiers && object instanceof EntityAttribute)
View Full Code Here

        final boolean withIdentifiers)
    {
        final Collection properties = this.getProperties(follow);
        CollectionUtils.filter(
            properties,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid = true;
                    if (!withIdentifiers && object instanceof EntityAttribute)
View Full Code Here

        final Collection attributes = this.getAttributes(
                follow,
                withIdentifiers);
        CollectionUtils.filter(
            attributes,
            new Predicate()
            {
                public boolean evaluate(Object object)
                {
                    boolean valid;
                    valid = ((AttributeFacade)object).isRequired();
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.Predicate

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.