Package org.codehaus.aspectwerkz.extension.persistence.definition

Examples of org.codehaus.aspectwerkz.extension.persistence.definition.IndexDefinition


        if (btreeIndexes == null) throw new IllegalArgumentException("index configurations can not be null");

        final List indexes = new ArrayList();
        for (Iterator it = btreeIndexes.iterator(); it.hasNext();) {

            final IndexDefinition indexDef = (IndexDefinition)it.next();
            final String jispIndexType = getJispIndexType(indexDef.getType());

            ObjectFactory factory = new DefaultObjectFactory(jispIndexType);

            final StringBuffer indexFile = new StringBuffer();
            indexFile.append(m_indexDir);
            indexFile.append(File.separator);
            indexFile.append(indexDef.getName());

            File killit = new File(indexFile.toString());
            if (killit.exists()) killit.delete();

            final BTreeIndex index = new BTreeIndex(
                    indexFile.toString(),
                    INDEX_ORDER,
                    (KeyObject)factory.newInstance(),
                    false, m_loader);

            indexes.add(index);

            m_jispIndexes.put(indexDef.getName(), index);

            final Class indexType = m_loader.loadClass(
                    getJispIndexType(indexDef.getType()));

            m_jispIndexTypes.put(indexDef.getName(), indexType);
        }
        return indexes;
    }
View Full Code Here


        final List indexes = new ArrayList();

        for (Iterator it = btreeIndexes.iterator(); it.hasNext();) {

            final IndexDefinition indexDef = (IndexDefinition)it.next();

            final StringBuffer indexFile = new StringBuffer();
            indexFile.append(m_databaseDir);
            indexFile.append(File.separator);
            indexFile.append(indexDef.getName());

            final BTreeIndex index = new BTreeIndex(indexFile.toString(), m_loader);
            indexes.add(index);

            m_jispIndexes.put(indexDef.getName(), index);

            final Class indexType = m_loader.loadClass(
                    getJispIndexType(indexDef.getType()));

            m_jispIndexTypes.put(indexDef.getName(), indexType);
        }
        return indexes;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.extension.persistence.definition.IndexDefinition

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.