org.fuchss.objectcasket.tablemodule.TabModImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of object-casket Show documentation
Show all versions of object-casket Show documentation
Object Casket is a simple O/R mapper that can be used together with the Java Persistence API (JPA). The aim is to provide a simple solution for small projects to store multi-related
entities in a simple manner.
package org.fuchss.objectcasket.tablemodule;
import org.fuchss.objectcasket.common.CasketException;
import org.fuchss.objectcasket.sqlconnector.SqlPort;
import org.fuchss.objectcasket.tablemodule.impl.ModuleFactoryImpl;
import org.fuchss.objectcasket.tablemodule.port.ModuleConfiguration;
import org.fuchss.objectcasket.tablemodule.port.TableModule;
import org.fuchss.objectcasket.tablemodule.port.TableModuleFactory;
class TabModImpl implements ModulePort, TableModuleFactory {
private ModuleFactoryImpl modFac;
@Override
public synchronized TableModuleFactory tableModuleFactory() {
if (this.modFac == null)
this.modFac = new ModuleFactoryImpl(SqlPort.SQL_PORT.sqlObjectFactory(), SqlPort.SQL_PORT.sqlDatabaseFactory());
return this;
}
@Override
public synchronized void closeModule(TableModule tabMod) throws CasketException {
this.modFac.closeModule(tabMod);
}
@Override
public synchronized void closeAllModules(ModuleConfiguration config) throws CasketException {
this.modFac.closeAllModules(config);
}
@Override
public synchronized ModuleConfiguration createConfiguration() {
return this.modFac.createConfiguration();
}
@Override
public synchronized TableModule newTableModule(ModuleConfiguration config) throws CasketException {
return this.modFac.newTableModule(config);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy