Package org.apache.ojb.broker.metadata

Examples of org.apache.ojb.broker.metadata.IndexDescriptor


        // Get Indices IndexDescriptor
        it = cld.getIndexes().iterator();
      while (it.hasNext())
      {
        IndexDescriptor indexDesc = (IndexDescriptor)it.next();
        newChildren.add(new OjbMetaIndexDescriptorNode(
          this.getOjbMetaTreeModel().getRepository(),
          this.getOjbMetaTreeModel(),
          this,
          indexDesc));
View Full Code Here


        // Get Indices IndexDescriptor
        it = cld.getIndexes().iterator();
      while (it.hasNext())
      {
        IndexDescriptor indexDesc = (IndexDescriptor)it.next();
        newChildren.add(new OjbMetaIndexDescriptorNode(
          this.getOjbMetaTreeModel().getRepository(),
          this.getOjbMetaTreeModel(),
          this,
          indexDesc));
View Full Code Here

public class TorqueIndexGenerator {

    public void generateIndices(Vector indexDescriptors, StringBuffer buffer) {
        int numIndexes = indexDescriptors.size();
        for (int i = 0; i < numIndexes; i++) {
            IndexDescriptor index = (IndexDescriptor) indexDescriptors.get(i);
            String indexTag = getIndexTag(index);

            buffer.append("        <");
            buffer.append(indexTag);
            if (index.getName() != null) {
                buffer.append(" name=\"");
                buffer.append(index.getName());
                buffer.append("\"");
            }
            buffer.append(">\n");

            generateStringVector(index.getIndexColumns(), indexTag + "-column", "name", "            ", buffer);
            buffer.append("        </");
            buffer.append(indexTag);
            buffer.append(">\n");
        }
    }
View Full Code Here

public class TorqueIndexGenerator {

    public void generateIndices(Vector indexDescriptors, StringBuffer buffer) {
        int numIndexes = indexDescriptors.size();
        for (int i = 0; i < numIndexes; i++) {
            IndexDescriptor index = (IndexDescriptor) indexDescriptors.get(i);
            String indexTag = getIndexTag(index);

            buffer.append("        <");
            buffer.append(indexTag);
            if (index.getName() != null) {
                buffer.append(" name=\"");
                buffer.append(index.getName());
                buffer.append("\"");
            }
            buffer.append(">\n");

            generateStringVector(index.getIndexColumns(), indexTag + "-column", "name", "            ", buffer);
            buffer.append("        </");
            buffer.append(indexTag);
            buffer.append(">\n");
        }
    }
View Full Code Here

    public void testGenerateIndices() {
        StringBuffer buffer = new StringBuffer();
        Vector indexDescriptors = new Vector();

        IndexDescriptor indexUnique = new IndexDescriptor();
        indexUnique.setName("JUnit name1");
        indexUnique.setUnique(true);
        Vector columns = new Vector();
        columns.add("JUnit column1");
        columns.add("JUnit column2");
        indexUnique.setIndexColumns(columns);
        indexDescriptors.add(indexUnique);

        IndexDescriptor indexNotUnique = new IndexDescriptor();
        indexNotUnique.setName("JUnit name2");
        indexNotUnique.setUnique(false);
        columns = new Vector();
        columns.add("JUnit column3");
        indexNotUnique.setIndexColumns(columns);
        indexDescriptors.add(indexNotUnique);

        this.indexGenerator.generateIndices(indexDescriptors, buffer);

View Full Code Here

        // Get Indices IndexDescriptor
        it = cld.getIndexes().iterator();
      while (it.hasNext())
      {
        IndexDescriptor indexDesc = (IndexDescriptor)it.next();
        newChildren.add(new OjbMetaIndexDescriptorNode(
          this.getOjbMetaTreeModel().getRepository(),
          this.getOjbMetaTreeModel(),
          this,
          indexDesc));
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.metadata.IndexDescriptor

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.