/** * Get the {@link SchemaModel} associated with this instance, derived from the annotations on the scanned classes. * * @return the associated schema model */ public SchemaModel getSchemaModel() { if (this.schemaModel == null) { final SchemaModel model = new SchemaModel(); for (JClass<?> jclass : this.jclasses.values()) { final SchemaObjectType schemaObjectType = jclass.toSchemaItem(this); model.getSchemaObjectTypes().put(schemaObjectType.getStorageId(), schemaObjectType); } this.schemaModel = model; this.schemaModel.lockDown(); this.log.debug("JSimpleDB schema generated from annotated classes:\n{}", this.schemaModel); } return this.schemaModel; }
else { lockedDownSchemaModel = schemaModel.clone(); lockedDownSchemaModel.lockDown();