Package org.kie.api.definition.type

Examples of org.kie.api.definition.type.FactField


        //each of the fields in the old definition that are also present in the
        //new definition must have the same type. If not -> Incompatible
        boolean allFieldsInOldDeclarationAreStillPresent = true;
        for ( FactField oldFactField : oldFields ) {
            FactField newFactField = newFieldsMap.get( oldFactField.getName() );

            if ( newFactField != null ) {
                //we can't use newFactField.getType() since it throws a NPE at this point.
                String newFactType = ((FieldDefinition) newFactField).getTypeName();

                if ( !newFactType.equals( oldFactField.getType().getCanonicalName() ) ) {
                    throw new IncompatibleClassChangeError( "Type Declaration " + newDeclaration.getTypeName() + "." + newFactField.getName() + " has a different"
                                                            + " type that its previous definition: " + newFactType
                                                            + " != " + oldFactField.getType().getCanonicalName() );
                }
            } else {
                allFieldsInOldDeclarationAreStillPresent = false;
View Full Code Here


        //each of the fields in the old definition that are also present in the
        //new definition must have the same type. If not -> Incompatible
        boolean allFieldsInOldDeclarationAreStillPresent = true;
        for (FactField oldFactField : oldFields) {
            FactField newFactField = newFieldsMap.get(oldFactField.getName());

            if (newFactField != null){
                //we can't use newFactField.getType() since it throws a NPE at this point.
                String newFactType = ((FieldDefinition)newFactField).getTypeName();

                if (!newFactType.equals(oldFactField.getType().getCanonicalName())){
                    throw new IncompatibleClassChangeError("Type Declaration "+newDeclaration.getTypeName()+"."+newFactField.getName()+" has a different"
                        + " type that its previous definition: "+newFactType
                        +" != "+oldFactField.getType().getCanonicalName());
                }
            }else{
                allFieldsInOldDeclarationAreStillPresent = false;
View Full Code Here

        //each of the fields in the old definition that are also present in the
        //new definition must have the same type. If not -> Incompatible
        boolean allFieldsInOldDeclarationAreStillPresent = true;
        for (FactField oldFactField : oldFields) {
            FactField newFactField = newFieldsMap.get(oldFactField.getName());

            if (newFactField != null) {
                //we can't use newFactField.getType() since it throws a NPE at this point.
                String newFactType = ((FieldDefinition) newFactField).getTypeName();

                if (!newFactType.equals( ((FieldDefinition) oldFactField).getTypeName())) {
                    throw new IncompatibleClassChangeError("Type Declaration " + newDeclaration.getTypeName() + "." + newFactField.getName() + " has a different"
                                                           + " type that its previous definition: " + newFactType
                                                           + " != " + oldFactField.getType().getCanonicalName());
                }
            } else {
                allFieldsInOldDeclarationAreStillPresent = false;
View Full Code Here

        Set set = new HashSet();

        List<FactField> list = this.typeDef.getFields();
        for (FactField factField : list) {
            final FactField ff = factField;
            Map.Entry<String, Object> ent = new Map.Entry<String, Object>() {

                public String getKey() {
                    return ff.getName();
                }

                public Object getValue() {
                    return typeDef.get(bean, ff.getName());
                }

                public Object setValue(Object o) {
                    typeDef.set(bean, ff.getName(), o);
                    return o;
                }

            };
        }
View Full Code Here

TOP

Related Classes of org.kie.api.definition.type.FactField

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.