public CmsFolder createFolder(ResultSet res, CmsUUID projectId, boolean hasProjectIdInResultSet)
    throws SQLException {

        CmsUUID structureId = new CmsUUID(res.getString(m_sqlManager.readQuery("C_RESOURCES_STRUCTURE_ID")));
        CmsUUID resourceId = new CmsUUID(res.getString(m_sqlManager.readQuery("C_RESOURCES_RESOURCE_ID")));
        String resourcePath = res.getString(m_sqlManager.readQuery("C_RESOURCES_RESOURCE_PATH"));
        int resourceType = res.getInt(m_sqlManager.readQuery("C_RESOURCES_RESOURCE_TYPE"));
        int resourceFlags = res.getInt(m_sqlManager.readQuery("C_RESOURCES_RESOURCE_FLAGS"));
        int resourceState = res.getInt(m_sqlManager.readQuery("C_RESOURCES_STATE"));
        int structureState = res.getInt(m_sqlManager.readQuery("C_RESOURCES_STRUCTURE_STATE"));
        long dateCreated = res.getLong(m_sqlManager.readQuery("C_RESOURCES_DATE_CREATED"));
        long dateLastModified = res.getLong(m_sqlManager.readQuery("C_RESOURCES_DATE_LASTMODIFIED"));
        long dateReleased = res.getLong(m_sqlManager.readQuery("C_RESOURCES_DATE_RELEASED"));
        long dateExpired = res.getLong(m_sqlManager.readQuery("C_RESOURCES_DATE_EXPIRED"));
        CmsUUID userCreated = new CmsUUID(res.getString(m_sqlManager.readQuery("C_RESOURCES_USER_CREATED")));
        CmsUUID userLastModified = new CmsUUID(res.getString(m_sqlManager.readQuery("C_RESOURCES_USER_LASTMODIFIED")));
        CmsUUID resProjectId = new CmsUUID(res.getString("LOCKED_IN_PROJECT"));
        int resourceVersion = res.getInt(m_sqlManager.readQuery("C_RESOURCES_VERSION"));
        int structureVersion = res.getInt(m_sqlManager.readQuery("C_RESOURCES_STRUCTURE_VERSION"));
        int resourceSize = res.getInt(m_sqlManager.readQuery("C_RESOURCES_SIZE"));

        // in case of folder type ensure, that the root path has a trailing slash
        if (CmsFolder.isFolderSize(resourceSize)) {
            resourcePath = CmsFileUtil.addTrailingSeparator(resourcePath);
        }

        int newState = (structureState > resourceState) ? structureState : resourceState;

        return new CmsFolder(
            structureId,
            resourceId,
            resourcePath,
            resourceType,
            resourceFlags,
            resProjectId,
            CmsResourceState.valueOf(newState),
            dateCreated,
            userCreated,
            dateLastModified,
            userLastModified,
            dateReleased,
            dateExpired,
            resourceVersion + structureVersion);
    }
public CmsFolder createFolder ( ResultSet res , CmsUUID projectId , boolean hasProjectIdInResultSet ) throws SQLException { CmsUUID structureId = new CmsUUID ( res . getString ( m_sqlManager . readQuery ( "C_RESOURCES_STRUCTURE_ID" ) ) ) ; CmsUUID resourceId = new CmsUUID ( res . getString ( m_sqlManager . readQuery ( "C_RESOURCES_RESOURCE_ID" ) ) ) ; String resourcePath = res . getString ( m_sqlManager . readQuery ( "C_RESOURCES_RESOURCE_PATH" ) ) ; int resourceType = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_RESOURCE_TYPE" ) ) ; int resourceFlags = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_RESOURCE_FLAGS" ) ) ; int resourceState = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_STATE" ) ) ; int structureState = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_STRUCTURE_STATE" ) ) ; long dateCreated = res . getLong ( m_sqlManager . readQuery ( "C_RESOURCES_DATE_CREATED" ) ) ; long dateLastModified = res . getLong ( m_sqlManager . readQuery ( "C_RESOURCES_DATE_LASTMODIFIED" ) ) ; long dateReleased = res . getLong ( m_sqlManager . readQuery ( "C_RESOURCES_DATE_RELEASED" ) ) ; long dateExpired = res . getLong ( m_sqlManager . readQuery ( "C_RESOURCES_DATE_EXPIRED" ) ) ; CmsUUID userCreated = new CmsUUID ( res . getString ( m_sqlManager . readQuery ( "C_RESOURCES_USER_CREATED" ) ) ) ; CmsUUID userLastModified = new CmsUUID ( res . getString ( m_sqlManager . readQuery ( "C_RESOURCES_USER_LASTMODIFIED" ) ) ) ; CmsUUID resProjectId = new CmsUUID ( res . getString ( "LOCKED_IN_PROJECT" ) ) ; int resourceVersion = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_VERSION" ) ) ; int structureVersion = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_STRUCTURE_VERSION" ) ) ; int resourceSize = res . getInt ( m_sqlManager . readQuery ( "C_RESOURCES_SIZE" ) ) ; if ( CmsFolder . isFolderSize ( resourceSize ) ) { resourcePath = CmsFileUtil . addTrailingSeparator ( resourcePath ) ; } int newState = ( structureState > resourceState ) ? structureState : resourceState ; return new CmsFolder ( structureId , resourceId , resourcePath , resourceType , resourceFlags , resProjectId , CmsResourceState . valueOf ( newState ) , dateCreated , userCreated , dateLastModified , userLastModified , dateReleased , dateExpired , resourceVersion + structureVersion ) ; }
@see org.opencms.db.I_CmsVfsDriver#createFolder(java.sql.ResultSet, CmsUUID, boolean)