protected void checkVersions(final ORecordId rid, final int iRecordVersion, final int iDatabaseVersion) { if (OFastConcurrentModificationException.enabled()) throw OFastConcurrentModificationException.instance(); else throw new OConcurrentModificationException(rid, iDatabaseVersion, iRecordVersion, ORecordOperation.UPDATED); } }
protected void checkOpenness() { if (ownerPool == null) throw new ODatabaseException( "Database instance has been released to the pool. Get another database instance from the pool with the right username and password"); // super.checkOpenness(); } }
private boolean handleIndexAsTarget(ODeleteExecutionPlan result, OIndexIdentifier indexIdentifier, OWhereClause whereClause, OCommandContext ctx) { if (indexIdentifier == null) { return false; } throw new OCommandExecutionException("DELETE VERTEX FROM INDEX is not supported"); }
/** * Checks if the storage is open. If it's closed an exception is raised. */ @SuppressWarnings("WeakerAccess") protected final void checkOpenness() { if (status != STATUS.OPEN) { throw new OStorageException("Storage " + name + " is not opened."); } }
protected static void checkSupportLinkedClass(OType type) { if (type != OType.LINK && type != OType.LINKSET && type != OType.LINKLIST && type != OType.LINKMAP && type != OType.EMBEDDED && type != OType.EMBEDDEDSET && type != OType.EMBEDDEDLIST && type != OType.EMBEDDEDMAP && type != OType.LINKBAG) throw new OSchemaException("Linked class is not supported for type: " + type); }
public OQueryParsingException(final String iMessage, final String iText, final int iPosition) { super(makeMessage(iPosition, iText, iMessage)); text = iText; position = iPosition; }
private void validateKeySize(int numBytes) { if (numBytes != 16 && numBytes != 24 && numBytes != 32) { throw new OInvalidStorageEncryptionKeyException(INVALID_KEY_ERROR); } }
private void assertInitialized() { if (!initialized) { throw new OSecurityException(ENCRYPTION_NOT_INITIALIZED_ERROR); } }
public OConcurrentCreateException(final ORID expectedRID, final ORID actualRid) { super(makeMessage(expectedRID, actualRid)); this.expectedRid = expectedRID; this.actualRid = actualRid; }
@Override public String toString() { return super.toString() + " INDEX=" + indexName + " RID=" + rid; } }
private void checkEntreeSize(int entreeSize) { if (entreeSize > MAX_ENTREE_SIZE) throw new OSBTreeBonsaiLocalException( "Serialized key-value pair size bigger than allowed " + entreeSize + " vs " + MAX_ENTREE_SIZE + ".", tree); } }
private void checkAccess() { if (prohibitAccess) { throw new OAccessToSBtreeCollectionManagerIsProhibitedException(PROHIBITED_EXCEPTION_MESSAGE); } }
private void checkNullSupport(final K key) { if (key == null && !nullKeyIsSupported) { throw new OLocalHashTableException("Null keys are not supported.", this); } }
protected ODatabaseDocumentInternal getDatabase() { if (database == null) { throw new ODatabaseException("Database is closed"); } return (ODatabaseDocumentInternal) database; }
public OExpression getExpandContent() { throw new OCommandExecutionException("Invalid expand expression"); }
protected static void checkLinkTypeSupport(OType type) { if (type != OType.EMBEDDEDSET && type != OType.EMBEDDEDLIST && type != OType.EMBEDDEDMAP) throw new OSchemaException("Linked type is not supported for type: " + type); }
private void checkOpen() { if (!open) throw new ODatabaseException("OrientDB Instance is closed"); }
@Override public OSharedContext call() throws Exception { throw new ODatabaseException("Accessing to the database context before the database has bean initialized"); } });
private void checkClusterLimits() { if (clusterId < -2) throw new ODatabaseException("RecordId cannot support negative cluster id. Found: " + clusterId); if (clusterId > CLUSTER_MAX) throw new ODatabaseException("RecordId cannot support cluster id major than 32767. Found: " + clusterId); }
private void checkClusterLimits(int clusterId) { if (clusterId < -2) throw new ODatabaseException("RecordId cannot support negative cluster id. Found: " + clusterId); if (clusterId > CLUSTER_MAX) throw new ODatabaseException("RecordId cannot support cluster id major than 32767. Found: " + clusterId); }