org.hibernate.stat.Statistics.logSummary()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.hibernate.stat.Statistics.logSummary()方法的一些代码示例,展示了Statistics.logSummary()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Statistics.logSummary()方法的具体详情如下:
包路径:org.hibernate.stat.Statistics
类名称:Statistics
方法名:logSummary

Statistics.logSummary介绍

[英]log in info level the main statistics
[中]登录主要统计信息的信息级别

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public Object invoke(Object... args) {
    getStatistics( getEntityManagerFactory( args ) ).logSummary();
    return null;
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    getStatistics(getEntityManagerFactory(args)).logSummary();
    return null;
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    getStatistics(getEntityManagerFactory(args)).logSummary();
    return null;
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    getStatistics(getEntityManagerFactory(args)).logSummary();
    return null;
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    getStatistics(getEntityManagerFactory(args)).logSummary();
    return null;
  }
};

代码示例来源:origin: OpenClinica/OpenClinica

@Transactional
public Serializable save(T domainObject) {
  getSessionFactory().getStatistics().logSummary();
  Serializable id = getCurrentSession().save(domainObject);
  return id;
}

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5

@Override
  public Object invoke(Object... args) {
    getStatistics(getEntityManagerFactory(args)).logSummary();
    return null;
  }
};

代码示例来源:origin: OpenClinica/OpenClinica

@SuppressWarnings("unchecked")
@Transactional
public ArrayList<T> findAll() {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  return (ArrayList<T>) q.list();
}

代码示例来源:origin: OpenClinica/OpenClinica

@SuppressWarnings("unchecked") @Transactional public ArrayList<T> findAll() {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do";
  Query q = getCurrentSession().createQuery(query);
  return (ArrayList<T>) q.list();
}

代码示例来源:origin: OpenClinica/OpenClinica

@Transactional public T saveOrUpdate(T domainObject) {
  getSessionFactory().getStatistics().logSummary();
  getCurrentSession().saveOrUpdate(domainObject);
  return domainObject;
}

代码示例来源:origin: OpenClinica/OpenClinica

public Study findByUniqueId(String uniqueId) {
  getSessionFactory().getStatistics().logSummary();
  String query = " from Study do  where do.uniqueIdentifier = :uniqueId";
  Query q = getCurrentSession().createQuery(query);
  q.setParameter("uniqueId", uniqueId);
  return (Study) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public FormLayout findByOcOID(String OCOID) {
  getSessionFactory().getStatistics().logSummary();
  Query q = getCurrentSession().createQuery(findByOcIdQuery);
  q.setParameter("OCOID", OCOID);
  return (FormLayout) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public ArrayList<StudySubject> findByLabelAndParentStudy(String embeddedStudySubjectId, Study parentStudy) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.study.study.studyId = :studyid and do.label = :label";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  q.setInteger("studyid", parentStudy.getStudyId());
  q.setString("label", embeddedStudySubjectId);
  return (ArrayList<StudySubject>) q.list();
}

代码示例来源:origin: OpenClinica/OpenClinica

public CrfBean findByOcOID(String OCOID) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.ocOid = :OCOID";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  q.setString("OCOID", OCOID);
  return (CrfBean) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

@SuppressWarnings("unchecked") public T findByOcOID(String OCOID) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.oc_oid = :oc_oid";
  Query q = getCurrentSession().createQuery(query);
  q.setParameter("oc_oid", OCOID);
  return (T) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public Study updatePublicStudy(Study study) {
  String schema = CoreResources.getRequestSchema();
  if (StringUtils.isEmpty(schema))
    return null;
  CoreResources.setRequestSchema("public");
  getSessionFactory().getStatistics().logSummary();
  this.saveOrUpdate(study);
  CoreResources.setRequestSchema(schema);
  return study;
}
public List<String> findAllSchemas() {

代码示例来源:origin: OpenClinica/OpenClinica

public UserType findByUserTypeId(Integer userTypeId) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.userTypeId = :user_type_id";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  q.setInteger("user_type_id", userTypeId);
  return (UserType) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public StudySubject findByOcOID(String OCOID) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.ocOid = :OCOID";
  Query q = getCurrentSession().createQuery(query);
  q.setParameter("OCOID", OCOID);
  return (StudySubject) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public ItemGroup findByOcOID(String OCOID) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.ocOid = :OCOID";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  q.setString("OCOID", OCOID);
  return (ItemGroup) q.uniqueResult();
}

代码示例来源:origin: OpenClinica/OpenClinica

public ItemGroup findByCrfAndGroupLayout(CrfBean crf, String layout) {
  getSessionFactory().getStatistics().logSummary();
  String query = "from " + getDomainClassName() + " do  where do.crf = :crf and do.layoutGroupPath = :layout ";
  org.hibernate.Query q = getCurrentSession().createQuery(query);
  q.setEntity("crf", crf);
  q.setString("layout", layout);
  return (ItemGroup) q.uniqueResult();
}

相关文章

Statistics类方法