Package com.nexirius.framework.datamodel

Examples of com.nexirius.framework.datamodel.DataModelEnumeration


        getList().fireValueChange();
    }

    private boolean hasSelectedEntries() {
        DataModelEnumeration en = getList().getEnumeration();

        while (en.hasMore()) {
            MailModel mail = (MailModel) en.next();

            if (mail.isSelected()) {
                return true;
            }
        }
View Full Code Here


        }
    }

    public void update(DataModel model) {
        if (model instanceof ArrayModel) {
            DataModelEnumeration en = model.getEnumeration();

            while (en.hasMore()) {
                DataModel child = en.next();

                if (child.getInstanceName() == null) {
                    create(child);
                } else {
                    update(child);
View Full Code Here

            }
        }
    }

    public void updateChildren(DataModel parent, ArrayModel children) {
        DataModelEnumeration en = children.getEnumeration();

        while (en.hasMore()) {
            DataModel child = en.next();

            if (child.getInstanceName() == null) {
                child.setChildText(ITeamPersistence.FOREIGN_KEY, parent.getInstanceName());
                create(child);
            } else {
View Full Code Here

    public void createChildren(DataModel parent, ArrayModel children) {
        if (parent.getInstanceName() == null) {
            create(parent);
        }

        DataModelEnumeration en = children.getEnumeration();

        while (en.hasMore()) {
            DataModel model = en.next();
            model.setChildText(ITeamPersistence.FOREIGN_KEY, parent.getInstanceName());
            create(model);
        }
    }
View Full Code Here

    public void delete(DataModelVector v) {
        if (v == null) {
            return;
        }

        DataModelEnumeration en = v.getEnumeration();

        while (en.hasMore()) {
            FilePersistence.getInstance().delete(en.next());
        }
    }
View Full Code Here

        }
    }

    public void deleteMember(MemberModel member) {
        AddressArrayModel addresses = member.getAddresses();
        DataModelEnumeration en = addresses.getEnumeration();

        while (en.hasMore()) {
            DataModel model = en.next();
            FilePersistence.getInstance().delete(model);
        }

        PhoneArrayModel phones = member.getPhones();
        DataModelEnumeration en1 = phones.getEnumeration();
        while (en1.hasMore()) {
            DataModel model = en1.next();
            FilePersistence.getInstance().delete(model);
        }

        FilePersistence.getInstance().delete(member.getPerson());
        FilePersistence.getInstance().delete(member);
View Full Code Here

        return array;
    }

    public static void setDialogPropertiesModels(ArrayModel array) {
        DataModelEnumeration en = array.getEnumeration();

        while (en.hasMore()) {
            DialogPropertiesModel dialogPropertiesModel = (DialogPropertiesModel) en.next();
            dialogProperties.put(dialogPropertiesModel.getName(), dialogPropertiesModel);
        }
    }
View Full Code Here

            throw new Exception("Child " + childName + " of " + parser.getModel().getFieldName() + " is not an ArrayModel");
        }

        ArrayModel array = (ArrayModel) child;
        DataModelEnumeration e = array.getEnumeration();
        VariableStore variableStore = parser.getResolver().getVariableStore();
        int index = 0;
        String oldIndex = variableStore.getValueOf(VariableStore.INDEX);
        String oldCount = variableStore.getValueOf(VariableStore.COUNT);
        String template = getTemplate();
        boolean childIsEditor = parser.isEditor();
        Boolean type = getIsEditor();

        if (type != null) {
            childIsEditor = type.booleanValue();
        }

        variableStore.setVariable(VariableStore.COUNT, Integer.toString(array.getSize()));

        while (e.hasMore()) {
            DataModel item = e.next();

            variableStore.setVariable(VariableStore.INDEX, Integer.toString(index + 1));

            byte result[] = parser.getResolver().resolve(sessionVariable, item, template, childIsEditor);
View Full Code Here

    private void p(String method, String model, String env) {
        if (verbose) {
            System.out.println(method + " " + model + " " + env);

            DataModelEnumeration e = openModels.getEnumeration();

            System.out.print("open[");

            while (e.hasMore()) {
                System.out.print(e.next().getInstanceName() + " ");
            }

            System.out.println("]");

            StringVector envs = getEnvironments();
View Full Code Here

        }
    }

    public void saveTo(String filename, String locale) throws Exception {
        XFile file = new XFile(filename);
        DataModelEnumeration e = getEnumeration();
        StringVector lines = new StringVector();

        while (e.hasMore()) {
            EntryModel entry = (EntryModel) e.next();

            String line = entry.getLine(locale);

            if (line != null) {
                lines.append(line);
View Full Code Here

TOP

Related Classes of com.nexirius.framework.datamodel.DataModelEnumeration

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.