/** * <p>Retrieve a list of all entities.</p> * @param pAddParam additional param * @return list of all business objects * @throws Exception - an exception */ @Override public final List<T> retrieveList( final Map<String, Object> pAddParam) throws Exception { return this.srvOrm.retrieveList(this.entityClass); }
/** * <p>Calculate total rows for pagination.</p> * @param pAddParam additional param * @return Integer row count * @throws Exception - an exception */ @Override public final Integer evalRowCount( final Map<String, Object> pAddParam) throws Exception { return this.srvOrm.evalRowCount(this.entityClass); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmH2 - ORM service */ @Override public final synchronized SrvOrmH2<ResultSet> instantiateSrvOrm() { return new SrvOrmH2<ResultSet>(); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmSqlite - ORM service */ public final synchronized SrvOrmSqlite<ResultSet> instantiateSrvOrm() { return new SrvOrmSqlite<ResultSet>(); }
/** * <p>Retrieve entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final T retrieveEntityById(final Map<String, Object> pAddParam, final Object pId) throws Exception { return this.srvOrm.retrieveEntityById(this.entityClass, pId); }
/** * <p>Geter for database ID.</p> * @return ID database **/ @Override public final int getIdDatabase() { return this.srvDatabase.getIdDatabase(); }
/** * <p>Calculate total rows for pagination.</p> * @param pAddParam additional param * @param pWhere not null e.g. "ITSID > 33" * @return Integer row count * @throws Exception - an exception */ @Override public final Integer evalRowCountWhere(final Map<String, Object> pAddParam, final String pWhere) throws Exception { return this.srvOrm.evalRowCountWhere(this.entityClass, pWhere); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmPostgresql - ORM service */ @Override public final synchronized SrvOrmPostgresql<ResultSet> instantiateSrvOrm() { return new SrvOrmPostgresql<ResultSet>(); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmMysql - ORM service */ @Override public final synchronized SrvOrmMysql<ResultSet> instantiateSrvOrm() { return new SrvOrmMysql<ResultSet>(); }
/** * <p>Delete entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final Object pId) throws Exception { this.srvOrm.deleteEntity(this.entityClass, pId); }
/** * <p>Delete entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final Object pId) throws Exception { T entity = retrieveEntityById(pAddParam, pId); deleteEntity(pAddParam, entity); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmSqlite - ORM service */ public final synchronized SrvOrmSqlite<ResultSet> instantiateSrvOrm() { return new SrvOrmSqlite<ResultSet>(); }
/** * <p>Retrieve a list of all entities.</p> * @param pAddParam additional param * @return list of all business objects * @throws Exception - an exception */ @Override public final List<T> retrieveList( final Map<String, Object> pAddParam) throws Exception { return this.srvOrm.retrieveList(this.entityClass); }
/** * <p>Convert String to Entity value.</p> * @param pItsIdStr ID string value * @param pClazz Entity class * @return Entity value * @throws Exception an exception **/ @Override public final T convert(final String pItsIdStr, final Class<T> pClazz) throws Exception { return srvOrm.retrieveEntityById(pClazz, pItsIdStr); }
/** * <p>Calculate total rows for pagination.</p> * @param pAddParam additional param * @return Integer row count * @throws Exception - an exception */ @Override public final Integer evalRowCount( final Map<String, Object> pAddParam) throws Exception { return this.srvOrm.evalRowCount(this.entityClass); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmH2 - ORM service */ @Override public final synchronized SrvOrmH2<ResultSet> instantiateSrvOrm() { return new SrvOrmH2<ResultSet>(); }
/** * <p>Calculate total rows for pagination.</p> * @param pAddParam additional param * @param pWhere not null e.g. "ITSID > 33" * @return Integer row count * @throws Exception - an exception */ @Override public final Integer evalRowCountWhere(final Map<String, Object> pAddParam, final String pWhere) throws Exception { return this.srvOrm.evalRowCountWhere(this.entityClass, pWhere); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmPostgresql - ORM service */ @Override public final synchronized SrvOrmPostgresql<ResultSet> instantiateSrvOrm() { return new SrvOrmPostgresql<ResultSet>(); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmMysql - ORM service */ @Override public final synchronized SrvOrmMysql<ResultSet> instantiateSrvOrm() { return new SrvOrmMysql<ResultSet>(); }
/** * <p>Instantiate ORM service.</p> * @return SrvOrmSqlite - ORM service */ @Override public final synchronized SrvOrmSqlite<ResultSet> instantiateSrvOrm() { return new SrvOrmSqlite<ResultSet>(); }