Search in sources :

Example 1 with OIntentMassiveRead

use of com.orientechnologies.orient.core.intent.OIntentMassiveRead in project orientdb by orientechnologies.

the class OConsoleDatabaseApp method declareIntent.

@ConsoleCommand(description = "Declare an intent", onlineHelp = "")
public void declareIntent(@ConsoleParameter(name = "Intent name", description = "name of the intent to execute") final String iIntentName) {
    checkForDatabase();
    message("\nDeclaring intent '" + iIntentName + "'...");
    if (iIntentName.equalsIgnoreCase("massiveinsert"))
        currentDatabase.declareIntent(new OIntentMassiveInsert());
    else if (iIntentName.equalsIgnoreCase("massiveread"))
        currentDatabase.declareIntent(new OIntentMassiveRead());
    else if (iIntentName.equalsIgnoreCase("null"))
        currentDatabase.declareIntent(null);
    else
        throw new IllegalArgumentException("Intent '" + iIntentName + "' not supported. Available ones are: massiveinsert, massiveread, null");
    message("\nIntent '" + iIntentName + "' set successfully");
}
Also used : OIntentMassiveRead(com.orientechnologies.orient.core.intent.OIntentMassiveRead) OIntentMassiveInsert(com.orientechnologies.orient.core.intent.OIntentMassiveInsert) ConsoleCommand(com.orientechnologies.common.console.annotation.ConsoleCommand)

Aggregations

ConsoleCommand (com.orientechnologies.common.console.annotation.ConsoleCommand)1 OIntentMassiveInsert (com.orientechnologies.orient.core.intent.OIntentMassiveInsert)1 OIntentMassiveRead (com.orientechnologies.orient.core.intent.OIntentMassiveRead)1