/** * <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<ReplicationAccMethod> retrieveList( final Map<String, Object> pAddParam) throws Exception { return getSrvOrm().retrieveList(ReplicationAccMethod.class); }
/** * <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 getSrvOrm().evalRowCountWhere(ReplicationAccMethod.class, pWhere); }
/** * <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 { getSrvOrm().deleteEntity(ReplicationAccMethod.class, pId); }
/** * <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 evalRowCount( final Map<String, Object> pAddParam) throws Exception { return getSrvOrm().evalRowCount(ReplicationAccMethod.class); } /**
/** * <p>Retrieve a list of entities.</p> * @param pAddParam additional param * @param pQueryConditions Not NULL e.g. "where name='U1' ORDER BY id" * @return list of business objects * @throws Exception - an exception */ @Override public final List<ReplicationAccMethod> retrieveListWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions) throws Exception { return getSrvOrm().retrieveListWithConditions(ReplicationAccMethod.class, pQueryConditions); }
/** * <p>Delete entity from DB.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final ReplicationAccMethod pEntity) throws Exception { getSrvOrm().deleteEntity(ReplicationAccMethod.class, pEntity.getItsId()); }
/** * <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 ReplicationAccMethod retrieveEntityById( final Map<String, Object> pAddParam, final Object pId) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrieveEntityById(ReplicationAccMethod.class, pId); }
/** * <p>Retrieve a page of entities.</p> * @param pAddParam additional param * @param pFirst number of the first record * @param pPageSize page size (max records) * @return list of business objects * @throws Exception - an exception */ @Override public final List<ReplicationAccMethod> retrievePage( final Map<String, Object> pAddParam, final Integer pFirst, final Integer pPageSize) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrievePage(ReplicationAccMethod.class, pFirst, pPageSize); }
/** * <p>Retrieve a page of entities.</p> * @param pAddParam additional param * @param pQueryConditions Not NULL e.g. "where name='U1' ORDER BY id" * @param pFirst number of the first record * @param pPageSize page size (max records) * @return list of business objects * @throws Exception - an exception */ @Override public final List<ReplicationAccMethod> retrievePageWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions, final Integer pFirst, final Integer pPageSize) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrievePageWithConditions(ReplicationAccMethod.class, pQueryConditions, pFirst, pPageSize); }
/** * <p>Save entity into DB.</p> * @param pAddParam additional param * @param pEntity entity * @param isEntityDetached ignored * @throws Exception - an exception **/ @Override public final void saveEntity( final Map<String, Object> pAddParam, final ReplicationAccMethod pEntity, final boolean isEntityDetached) throws Exception { if (pEntity.getRequestedDatabaseId() == getSrvOrm().getIdDatabase()) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "requested_database_must_be_different"); } if (pEntity.getIsNew()) { getSrvOrm().insertEntity(pEntity); } else { getSrvOrm().updateEntity(pEntity); } for (IHandlerModelChanged<ReplicationAccMethod> replAccMethChangedHandler : this.replAccMethChangedHandlers) { replAccMethChangedHandler.handleModelChanged(pEntity); } }
/** * <p>Refresh entity from DB by given entity with ID.</p> * @param pEntity entity * @return entity or null * @throws Exception - an exception **/ @Override public final ReplicationAccMethod retrieveEntity( final Map<String, Object> pAddParam, final ReplicationAccMethod pEntity) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm() .retrieveEntityById(ReplicationAccMethod.class, pEntity.getItsId()); }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final ReplicationAccMethod createEntity( final Map<String, Object> pAddParam) throws Exception { ReplicationAccMethod entity = getSrvOrm() .createEntity(ReplicationAccMethod.class); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of 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 ReplicationAccMethod retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { ReplicationAccMethod entity = getSrvOrm() .retrieveCopyEntity(ReplicationAccMethod.class, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }