List of usage examples for org.hibernate StatelessSession get
Object get(Class entityClass, Serializable id);
From source file:vault.queryrouter.models.dao.QueryDAO.java
License:Apache License
public static void updateQueryLogWithError(StatelessSession session, String QuerylogID, Timestamp endTime, String errorMessage) {/*from www . j a v a 2 s .co m*/ Query query = (Query) session.get(Query.class, QuerylogID); query.setEndTime(endTime); query.setQueryStatus(QueryLogStatus.Failure.toString()); query.setErrorMessage(errorMessage); session.update(query); }
From source file:vault.queryrouter.models.dao.TenantMPPDBDAO.java
License:Apache License
public static Integer getTenantMppdbGroupId(StatelessSession session, int tenantMppdbId) { try {/*from w ww . j ava 2 s . c o m*/ TenantMPPDB object = (TenantMPPDB) session.get(TenantMPPDB.class, tenantMppdbId); return object.getTenantMppdbGroupId(); } catch (Exception e) { logger.error("Cannot getTenantMppdbGroupId", e); throw e; } }