@Override public boolean equals(final Object iOther) { if (!(iOther instanceof ODatabase)) return false; final ODatabase other = (ODatabase) iOther; return other.getName().equals(getName()); }
@Override public String getName() { return dbf.db().getName(); }
@Override public String getName() { return dbf.db().getName(); }
/** * Only allow detaching when we have no DB context or it is from a different DB. * If we have a valid context from the same DB then we don't need to detach yet. */ private boolean allowDetach() { ODatabase<?> db = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined(); return db == null || !getDbName().equals(db.getName()); }
private boolean startRecording(final ODatabase db) { if (recordingDatabases.contains(db.getName())) { db.registerListener(this); // this call must be made with the given db active on this thread withActiveDb(db, () -> db.registerHook(this, HOOK_POSITION.LAST)); return true; } return false; }
result.setProperty("name", db.getName()); result.setProperty("user", db.getUser() == null ? null : db.getUser().getName()); result.setProperty("type", String.valueOf(db.get(ODatabase.ATTRIBUTES.TYPE)));