/** * Close connection to defined, underlying implementation */ @Override public void close() { if(isOpen()) { this.open = false; } else { log.trace("Model was closed already, ignored."); } }
/** * Open connection to defined, unterlying implementation. */ @Override public Model open() { if(isOpen()) { log.warn("Model is already open. Ignored."); } else { this.open = true; } return this; }
/** * Close connection to defined, unterlying implementation */ public void close() { if (isOpen()) { this.open = false; } else { log.debug("Model was closed already, ignored."); } }
/** * Open connection to defined, unterlying implementation. */ public void open() { if (isOpen()) { log.warn("Model is already open. Ignored."); } else { this.open = true; } }
public Object getUnderlyingModelImplementation() { if (!isOpen()) throw new ModelRuntimeException("Model is not open"); return this.model; }
@Override public Object getUnderlyingModelImplementation() { if(!isOpen()) throw new ModelRuntimeException("Model is not open"); return this.model; }
/** * This method checks if the model is properly initialized and i.e. not * closed. */ protected void assertModel() { if (this.getUnderlyingModelImplementation() == null) { throw new ModelRuntimeException("Underlying model is null."); } if (!isOpen()) throw new ModelRuntimeException("Model is not open"); }
/** * This method checks if the model is properly initialized and i.e. not * closed. */ protected void assertModel() { if(this.getUnderlyingModelImplementation() == null) { throw new ModelRuntimeException("Underlying model is null."); } if(!isOpen()) throw new ModelRuntimeException("Model is not open"); }