/** * <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 { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm() .retrieveEntityById(getEntityClass(), pId); }
/** * <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 getSrvOrm().retrieveList(getEntityClass()); }
/** * <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> * Synchronize entity (that just read) with entity in database. * It just check if it's new. * </p> * @param pEntity object * @param pAddParam additional params * @return isNew if entity exist in database (need update) * @throws Exception - an exception **/ @Override public final boolean sync(final Object pEntity, final Map<String, Object> pAddParam) throws Exception { Object entityPbDb = getSrvOrm().retrieveEntity(pEntity); return entityPbDb == null; }
/** * <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>Retrieve owned list of entities for owner. * E.g. invoices lines for invoice</p> * @param pAddParam additional param * @param pIdEntityOwner ID owner * @return owned list of business objects * @throws Exception - an exception */ @Override public final List<T> retrieveOwnedListById( final Map<String, Object> pAddParam, final Object pIdEntityOwner) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrieveEntityOwnedlist(getEntityClass(), ReplicationAccMethod.class, pIdEntityOwner); }
/** * <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(getEntityClass(), 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> * Synchronize entity (that just read) with entity in database. * It just check if it's new. * </p> * @param pAddParam additional params * @param pEntity object * @return isNew if entity exist in database (need update) * @throws Exception - an exception **/ @Override public final boolean sync(final Map<String, Object> pAddParam, final Object pEntity) throws Exception { Object entityPbDb = getSrvOrm().retrieveEntity(pAddParam, pEntity); return entityPbDb == null; }
/** * <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>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<T> retrievePage( final Map<String, Object> pAddParam, final Integer pFirst, final Integer pPageSize) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrievePage(getEntityClass(), pFirst, pPageSize); }
/** * <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(getEntityClass(), pWhere); }
/** * <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>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<T> retrievePageWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions, final Integer pFirst, final Integer pPageSize) throws Exception { addAccSettingsIntoAttrs(pAddParam); return getSrvOrm().retrievePageWithConditions( getEntityClass(), pQueryConditions, pFirst, pPageSize); }
/** * <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(getEntityClass()); } /**
/** * <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<T> retrieveListWithConditions( final Map<String, Object> pAddParam, final String pQueryConditions) throws Exception { return getSrvOrm().retrieveListWithConditions( getEntityClass(), pQueryConditions); }
/** * <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 T pEntity) throws Exception { getSrvOrm().deleteEntity(getEntityClass(), pEntity.getItsId()); }
/** * <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()); }