public String getTree(Record recPackages)
    {
        try {
            if (m_recPackagesTree == null)
            {
                RecordOwner recordOwner = this.getOwner().findRecordOwner();
                m_recPackagesTree = new Packages(recordOwner);
                if (recordOwner != null)
                    recordOwner.removeRecord(m_recPackagesTree);
            }
            String strPackagesTree = recPackages.getField(Packages.NAME).toString();
            m_recPackagesTree.addNew();
            m_recPackagesTree.getField(Packages.ID).moveFieldToThis(recPackages.getField(Packages.PARENT_FOLDER_ID));
            while ((m_recPackagesTree.getField(Packages.ID).getValue() > 0) && (m_recPackagesTree.seek(null)))
            {
                strPackagesTree = m_recPackagesTree.getField(Packages.NAME).toString() + '.' + strPackagesTree;
                m_recPackagesTree.getField(Packages.ID).moveFieldToThis(m_recPackagesTree.getField(Packages.PARENT_FOLDER_ID));
            }
            return strPackagesTree;
            
        } catch (DBException ex) {
            ex.printStackTrace();
            return null;
        }
    }
public String getTree ( Record recPackages ) { try { if ( m_recPackagesTree == null ) { RecordOwner recordOwner = this . getOwner ( ) . findRecordOwner ( ) ; m_recPackagesTree = new Packages ( recordOwner ) ; if ( recordOwner != null ) recordOwner . removeRecord ( m_recPackagesTree ) ; } String strPackagesTree = recPackages . getField ( Packages . NAME ) . toString ( ) ; m_recPackagesTree . addNew ( ) ; m_recPackagesTree . getField ( Packages . ID ) . moveFieldToThis ( recPackages . getField ( Packages . PARENT_FOLDER_ID ) ) ; while ( ( m_recPackagesTree . getField ( Packages . ID ) . getValue ( ) > 0 ) && ( m_recPackagesTree . seek ( null ) ) ) { strPackagesTree = m_recPackagesTree . getField ( Packages . NAME ) . toString ( ) + '.' + strPackagesTree ; m_recPackagesTree . getField ( Packages . ID ) . moveFieldToThis ( m_recPackagesTree . getField ( Packages . PARENT_FOLDER_ID ) ) ; } return strPackagesTree ; } catch ( DBException ex ) { ex . printStackTrace ( ) ; return null ; } }
GetTree Method.