find history

@param id model id
@return history models
@throws java.lang.Exception any error
331098
@GET
    @Path("{id}/history")
    public Response fetchHistory(@PathParam("id") URI_ID id) throws Exception {
        return super.fetchHistory(id);
    }
431484
@Override
    public T findById(ID id)
            throws NoSuchItemException, JeppettoException {
        QueryModel queryModel = new QueryModel();
        queryModel.addCondition(buildIdCondition(id));
        
        if (accessControlContextProvider != null) {
            queryModel.setAccessControlContext(accessControlContextProvider.getCurrent());
        }

        return findUniqueUsingQueryModel(queryModel);
    }
301000
protected function find($id)
    {
        $model = $this->model;
        $this->model = $model::find($id);
        if (!$this->model) {
            // belts and braces check - no model = doesn't exist (without being masked missing object property)
            // potential candidate for custom exception handling
            return false;
        }
        return $this->model->exists;
    }
37615
@Override
	public List<RecordAlert> getAlertsBySourceHistoryId(int historyId) throws DatabaseException {
    	SqlPreparedStatementWrapper psGetAlertsForHistoryId = null;
        try {
        	psGetAlertsForHistoryId = DbSQL.getSingleton().getPreparedStatement("alert.ps.getalertsforhistoryid");
			List<RecordAlert> result = new ArrayList<>();
			psGetAlertsForHistoryId.getPs().setLong(1, historyId);
			try (ResultSet rs = psGetAlertsForHistoryId.getPs().executeQuery()) {
			    RecordAlert ra = build(rs);
			    while (ra != null) {
			        result.add(ra);
			        ra = build(rs);
			    }
			}
			
			return result;
		} catch (SQLException e) {
			throw new DatabaseException(e);
		} finally {
			DbSQL.getSingleton().releasePreparedStatement(psGetAlertsForHistoryId);
		}
    }
1031124
public java.util.List<HistoryRecordEntry> getHistoryRecords() {
        if (historyRecords == null) {
            historyRecords = new com.amazonaws.internal.SdkInternalList<HistoryRecordEntry>();
        }
        return historyRecords;
    }
605444
public function historyCodeAction($id)
    {
        $em = $this->get('doctrine.orm.entity_manager');

        $history = $em->getRepository(AppearanceHistory::class)->find($id);

        if (empty($history)) {
            throw $this->createNotFoundException();
        }

        return $this->render('@CMS/AdminAppearance/history_code.html.twig', [
            'history' => $history,
        ]);
    }
939472
@Override
  public void deleteHistoricIdentityLink(String id) {
    if (isHistoryLevelAtLeast(HistoryLevel.AUDIT)) {
      getHistoricIdentityLinkEntityManager().delete(id);
    }
  }
146034
@Nullable
    public Relationship getRelationship(@Nonnull String id) {
        if (id == null || id.trim().length() == 0) {
            throw new IllegalArgumentException("A relationship ID must be specified.");
        }

        return relationshipsById.get(id);
    }
1193713
public DrawerProfile findProfileById(long id) {
        for (DrawerProfile profile : mProfileAdapter.getItems()) {
            if (profile.getId() == id) {
                return profile;
            }
        }
        return null;
    }
698118
@GET
    @Path("{id}/history/{start: " + DATE_REGEX + "}-{end: " + DATE_REGEX + "}")
    public Response fetchHistory(@PathParam("id") URI_ID id,
                                 @PathParam("start") Timestamp start,
                                 @PathParam("end") Timestamp end) throws Exception {
        return super.fetchHistory(id, start, end);
    }
331665
protected function findModel($id)
    {
        if (($model = Term::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
501000
static public Thread getThread(final long id) {
        final Thread[] threads = getAllThreads();
        for (Thread thread : threads)
            if (thread.getId() == id)
                return thread;
        return null;
    }
124602
def get_history_from_api(api=Rosemary::API.new)
      api.get_history(type, self.id.to_i)
    end
432455
public static List<String> couchStyleRevisionHistoryToFullRevisionIDs(final int start, List<String> ids) {
        List<String> revisionHistory = new ArrayList<String>();
        int generation = start;
        for (String revIdHash : ids) {
            revisionHistory.add(generation + "-" + revIdHash);
            generation--;
        }
        Collections.reverse(revisionHistory);
        return revisionHistory;
    }
783168
protected Object processFetchedHistoryModelList(final List<Version<MODEL>> list,
                                                    final MODEL_ID id) throws Exception {
        return list;
    }
1161416
public Response fetchHistoryAsOf(@PathParam("id") URI_ID id,
                                     @PathParam("asof") final Timestamp asOf) throws Exception {
        final MODEL_ID mId = tryConvertId(id);
        matchedFetchHistoryAsOf(mId, asOf);
        final Query<MODEL> query = server.find(modelType);

        defaultFindOrderBy(query);

        Object entity = executeTx(t -> {
            configDefaultQuery(query);
            configFetchHistoryAsOfQuery(query, mId, asOf);
            applyUriQuery(query, false);
            MODEL model = query.asOf(asOf).setId(mId).findOne();
            return processFetchedHistoryAsOfModel(mId, model, asOf);
        });

        if (isEmptyEntity(entity)) {
            return Response.noContent().build();
        }
        return Response.ok(entity).build();
    }
870961
public DbHistory[] get_property_history(String objname, String propname) throws DevFailed {
		return databaseDAO.get_property_history(this, objname, propname);
	}