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");
}
Aggregations