protected OrientVertex createVertex(OrientBaseGraph graph, int serverId, int threadId, int i) { final String uniqueId = serverId + "-" + threadId + "-" + i; final Object result = graph .command( new OCommandSQL( "create vertex Provider content {'id': '" + UUID.randomUUID().toString() + "', 'name': 'Billy" + uniqueId + "', 'surname': 'Mayes" + uniqueId + "', 'birthday': '" + ODatabaseRecordThreadLocal.INSTANCE .get() .getStorage() .getConfiguration() .getDateFormatInstance() .format(new Date()) + "', 'children': '" + uniqueId + "', 'saved': 0}")) .execute(); return (OrientVertex) result; }
@Override protected void onAfterDatabaseCreation(OrientBaseGraph db) { db.command(new OCommandSQL("CREATE CLASS Item extends V")).execute(); db.command(new OCommandSQL("CREATE PROPERTY Item.name STRING")).execute(); db.command(new OCommandSQL("CREATE PROPERTY Item.map EMBEDDEDMAP")).execute(); }