Skip to content

Instantly share code, notes, and snippets.

@ramykamel
Created August 6, 2012 20:15
Show Gist options
  • Save ramykamel/3278079 to your computer and use it in GitHub Desktop.
Save ramykamel/3278079 to your computer and use it in GitHub Desktop.
OrientDB First Encounter
package com.ramykamel;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.record.impl.ODocument;
/**
*
* @author Rameesh
*/
public class TestOrientDB {
public static void main(String[] args) {
TestOrientDB test = new TestOrientDB();
test.process();
}
private void process() {
ODatabaseDocumentTx db = new ODatabaseDocumentTx("local:database/mbp-database").open("admin", "admin");
try {
for(ODocument doc : db.browseClass("Company")){
System.out.println("hi");
}
} finally {
db.close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment