Package fr.soleil.salsa.entity.impl

Examples of fr.soleil.salsa.entity.impl.DirectoryImpl


        return result;
    }

    private IDirectory findDirectory(IDirectory root, List<String> path) {

        DirectoryImpl dummy = new DirectoryImpl();
        List<IDirectory> dummySubs = new ArrayList<IDirectory>();
        dummySubs.add(root);
        dummy.setSubDirectoriesList(dummySubs);

        IDirectory result = dummy;
        while (path.size() != 0) {
            String name = path.get(0);
            IDirectory d = findSubDirectory(result, name);
View Full Code Here


     * @param treeNode
     */
    private void refreshDirectory(IDirectory oldDirectoryModel, IDirectory loadRootDirectory) {

        if (loadRootDirectory == null) {
            loadRootDirectory = new DirectoryImpl();
            loadRootDirectory.setName(DEFAULT_ROOT_FOLDER_NAME);
            try {
                ConfigApi.saveDirectory(loadRootDirectory);
            }
            catch (PersistenceException e) {
View Full Code Here

        return result;
    }

    private IDirectory findDirectory(IDirectory root, List<String> path) {

        DirectoryImpl dummy = new DirectoryImpl();
        List<IDirectory> dummySubs = new ArrayList<IDirectory>();
        dummySubs.add(root);
        dummy.setSubDirectoriesList(dummySubs);

        IDirectory result = dummy;
        while (path.size() != 0) {
            String name = path.get(0);
            IDirectory d = findSubDirectory(result, name);
View Full Code Here

     * @param treeNode
     */
    private void refreshDirectory(IDirectory oldDirectoryModel, IDirectory loadRootDirectory) {

        if (loadRootDirectory == null) {
            loadRootDirectory = new DirectoryImpl();
            loadRootDirectory.setName(DEFAULT_ROOT_FOLDER_NAME);
            try {
                ConfigApi.saveDirectory(loadRootDirectory);
            }
            catch (PersistenceException e) {
View Full Code Here

    /**
     * Default constructor, that creates a new instance of DirectoryImpl and wraps it.
     */
    public DirectoryModel() {
        this(new DirectoryImpl());
    }
View Full Code Here

            deleteConfigNoCommit(c);
            }
        }

        // Delete the directory
        IDirectory d = new DirectoryImpl();
        d.setId(directory.getId());
        d.setTimestamp(directory.getTimestamp());
        deleteDirectoryNoCommit(d);

        return true;
    }
View Full Code Here

            configuration.setTimestamp(rs.getTimestamp("timestamp"));

            int parentId = rs.getInt("directoryid");

            if (!rs.wasNull()) {
                DirectoryImpl parent = new DirectoryImpl();
                parent.setId(parentId);
                configuration.setDirectoryId(parentId);
                configuration.setDirectory(parent);
                // configuration.setDirectory(getDirectoryById(dir));
            }
        }
View Full Code Here

     *            : the identifier of the directory
     * @return Directory
     */
    public IDirectory getDirectoryById(Integer directoryId) {

        DirectoryImpl directory = null;
        String query = "SELECT * FROM directory where directoryid="
                + directoryId;

        try {
            startOperation();
            ResultSet rs = stmt.executeQuery(query);

            while (rs.next()) {

                directory = new DirectoryImpl();

                directory.setId(rs.getInt("directoryid"));
                directory.setName(rs.getString("name"));
                directory.setPositionInDirectory(rs
                        .getInt("positionInDirectory"));
                directory.setTimestamp(rs.getTimestamp("timestamp"));
                Integer dir = rs.getInt("directory");

                if (dir != null) {
                    DirectoryImpl parent = new DirectoryImpl();
                    parent.setId(dir);
                    directory.setDirectory(parent);
                    // directory.setParentDirectory(getDirectoryById(dir));
                }
            }
            rs.close();
View Full Code Here

        try {
            startOperation();

            ResultSet rs = stmt.executeQuery(query);

            DirectoryImpl directory = null;
            while (rs.next()) {
                directory = new DirectoryImpl();
                directory.setId(rs.getInt("directoryid"));
                directory.setName(rs.getString("name"));
                directory.setPositionInDirectory(rs
                        .getInt("positionInDirectory"));
                directory.setTimestamp(rs.getTimestamp("timestamp"));

                int parentDirectoryId = rs.getInt("directory");

                if (!rs.wasNull()) {
                    IDirectory parent = new DirectoryImpl();
                    parent.setId(parentDirectoryId);
                    directory.setDirectory(parent);
                    // directory.setParentDirectoryId(parentDirectoryId);
                }
                directoryList.add(directory);
            }
View Full Code Here

        return result;
    }

    private IDirectory findDirectory(IDirectory root, List<String> path) {

        DirectoryImpl dummy = new DirectoryImpl();
        List<IDirectory> dummySubs = new ArrayList<IDirectory>();
        dummySubs.add(root);
        dummy.setSubDirectoriesList(dummySubs);

        IDirectory result = dummy;
        while (path.size() != 0) {
            String name = path.get(0);
            IDirectory d = findSubDirectory(result, name);
View Full Code Here

TOP

Related Classes of fr.soleil.salsa.entity.impl.DirectoryImpl

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.