Package com.intersys.gds

Examples of com.intersys.gds.DocumentType


      jug.put("location", location);
      worldJugs.add(jug);
    }
    //3 TODO: Without schema you will get nulls instead of Exceptions.  Add exception/error notification.
    Document firstJUG = worldJugs.get(0);
    DocumentType jugType = DocumentType.createDocumentType("WorldJUGs", firstJUG);
    jugType.setReference("location", ElementType.TYPE_REFERENCE, "Location", "country");
    connection.saveDocumentType(jugType);
   
    Document jugLocation = (Document) firstJUG.get("location");
    DocumentType locationType = DocumentType.createDocumentType("Location", jugLocation);
    locationType.setReference("venue", ElementType.TYPE_BACK_REFERENCE, "WorldJUGs", "NONE");
    connection.saveDocumentType(locationType);
   
    //4.Create the db object handle
    DocumentMap dbDocHandle = connection.getDocumentMap("WorldJUGs");
   
View Full Code Here


    private void createSchema() {
        // since we fully intitialized data, we can use the flavor
        // of creatDocumentType which takes a Document and infers
        // the types
        DocumentType type = DocumentType.createDocumentType("Benchmark",data[0]);
        connection.saveDocumentType(type);
    }
View Full Code Here

    private void createSchema() {
        // We will use the first customer data to infer types
        Document firstCustomer = customersData.get(0);

        // Customers schema
        DocumentType customersType = DocumentType.createDocumentType("Customers",firstCustomer);
        customersType.setReference("account",ElementType.TYPE_REFERENCE,"Accounts","number");

        // Customer indices
        customersType.addIndex("name",false);
        customersType.addIndex("ssn",true);
        customersType.addIndex("age",false);
        connection.saveDocumentType(customersType);

        // Accounts schema
        Document firstAccount = (Document)firstCustomer.get("account");
        DocumentType accountsType = DocumentType.createDocumentType("Accounts",firstAccount);
        accountsType.setReference("owner",ElementType.TYPE_BACK_REFERENCE,"Customers","TODO");

        // Accounts indices
        accountsType.addIndex("owner",true);
        accountsType.addIndex("number",true);
        connection.saveDocumentType(accountsType);
    }
View Full Code Here

TOP

Related Classes of com.intersys.gds.DocumentType

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.