protected void checkClass(ODatabaseDocumentInternal database) { if (_className == null) fetchClassName(); final OSchema immutableSchema = database.getMetadata().getImmutableSchemaSnapshot(); if (immutableSchema == null) return; if (_immutableClazz == null) { _immutableSchemaVersion = immutableSchema.getVersion(); _immutableClazz = (OImmutableClass) immutableSchema.getClass(_className); } else { if (_immutableSchemaVersion < immutableSchema.getVersion()) { _immutableSchemaVersion = immutableSchema.getVersion(); _immutableClazz = (OImmutableClass) immutableSchema.getClass(_className); } } }
private LoadingCache<OClass, Collection<OProperty>> getCache() { @SuppressWarnings("deprecation") int version = ODatabaseRecordThreadLocal.INSTANCE.get().getMetadata().getSchema().getVersion(); if(version>currentSchemaVersion) { CACHE.invalidateAll(); currentSchemaVersion=version; } return CACHE; }
if(db==null || oClass==null) return null; OSchema schema = db.getMetadata().getSchema(); int schemaVersion = schema.getVersion(); Integer prevSchemaVersion = schemaVersions.get(db.getURL()); if(!Objects.equals(prevSchemaVersion, schemaVersion))
protected OImmutableClass getImmutableSchemaClass(ODatabaseDocumentInternal database) { if (_immutableClazz == null) { if (_className == null) fetchClassName(); if (_className != null) { if (database == null) { database = getDatabaseIfDefined(); } if (database != null && !database.isClosed()) { final OSchema immutableSchema = database.getMetadata().getImmutableSchemaSnapshot(); if (immutableSchema == null) return null; _immutableSchemaVersion = immutableSchema.getVersion(); _immutableClazz = (OImmutableClass) immutableSchema.getClass(_className); } } } return _immutableClazz; }
writer.writeAttribute(2, true, "version", s.getVersion()); writer.writeAttribute(2, false, "blob-clusters", database.getBlobClusterIds()); if (!s.getClasses().isEmpty()) {