Examples of dropData()


Examples of com.nexirius.framework.datamodel.DataModel.dropData()

    public DataModel read(Class cl, String id) {
        try {
            XFile dir = getDirectory(cl);
            XFile file = new XFile(dir.getPath(), id);
            DataModel ret = (DataModel) cl.newInstance();
            ret.dropData(new String(file.getBytes()));
            ret.setInstanceName(id);
            return ret;
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of com.nexirius.framework.datamodel.DataModel.dropData()

            XFile dir = getDirectory(cl);
            StringVector files = dir.getFiles(false); // get the list of all the files in this directory
            for (String id = files.firstItem(); id != null; id = files.nextItem()) {
                DataModel model = (DataModel) cl.newInstance(); //create a new instance of the given type
                XFile file = new XFile(dir.getPath(), id);
                model.dropData(new String(file.getBytes()));
                model.setInstanceName(id);
                if (propertyValue == null || propertyValue.equals(model.getChildText(propertyName))) {
                    ret.addElement(model);
                }
            }
View Full Code Here

Examples of com.nexirius.jnex.example.datamodel.MainModel.dropData()

        XFile textFile = getTextFile();

        if (textFile.exists()) {
            try {
                mainModel.dropData(new String(textFile.getBytes()));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.