org.hibernate.classic.Session.merge()方法的使用及代码示例

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

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

Session.merge介绍

暂无

代码示例

代码示例来源:origin: denimgroup/threadfix

@Override
@Transactional
public void saveOrUpdate(SeverityFilter severityFilter) {
  if (severityFilter != null && severityFilter.getId() != null) {
    sessionFactory.getCurrentSession().merge(severityFilter);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(severityFilter);
  }
}

代码示例来源:origin: denimgroup/threadfix

@Override
public void saveOrUpdate(VulnerabilityFilter vulnerabilityFilter) {
  if (vulnerabilityFilter != null && vulnerabilityFilter.getId() != null) {
    sessionFactory.getCurrentSession().merge(vulnerabilityFilter);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(vulnerabilityFilter);
  }
}

代码示例来源:origin: denimgroup/threadfix

@Override
public void saveOrUpdate(AccessControlApplicationMap map) {
  if (map != null && map.getId() != null) {
    sessionFactory.getCurrentSession().merge(map);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(map);
  }
}

代码示例来源:origin: denimgroup/threadfix

@Override
public void saveOrUpdate(AccessControlTeamMap map) {
  if (map != null && map.getId() != null) {
    sessionFactory.getCurrentSession().merge(map);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(map);
  }
}

代码示例来源:origin: denimgroup/threadfix

@Override
public void saveOrUpdate(Application application) {
  if (application != null && application.getId() != null) {
    sessionFactory.getCurrentSession().merge(application);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(application);
  }
}

代码示例来源:origin: denimgroup/threadfix

@Override
public void saveOrUpdate(Role role) {
  if (role != null && role.getId() != null) {
    sessionFactory.getCurrentSession().merge(role);
  } else {
    sessionFactory.getCurrentSession().saveOrUpdate(role);
  }
}

代码示例来源:origin: org.geomajas/geomajas-project-deskmanager

/**
 * Get the territory of the authenticated user.
 * @return the territory.
 */
@Transactional
public Territory getTerritory() {
  for (Authentication authentication : getSecurityServiceResults()) {
    for (BaseAuthorization authorization : authentication.getAuthorizations()) {
      if (authorization instanceof DeskmanagerAuthorization) {
        DeskmanagerAuthorization deskmanagerAuthorization = (DeskmanagerAuthorization) authorization;
        if (deskmanagerAuthorization.getTerritory() != null) {
          return (Territory) session.getCurrentSession().merge(
              deskmanagerAuthorization.getTerritory());
        }
      }
    }
  }
  return null;
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-deskmanager

/**
 * Get the territory of the authenticated user.
 * @return the territory.
 */
@Transactional
public Territory getTerritory() {
  for (Authentication authentication : getSecurityServiceResults()) {
    for (BaseAuthorization authorization : authentication.getAuthorizations()) {
      if (authorization instanceof DeskmanagerAuthorization) {
        DeskmanagerAuthorization deskmanagerAuthorization = (DeskmanagerAuthorization) authorization;
        if (deskmanagerAuthorization.getTerritory() != null) {
          return (Territory) session.getCurrentSession().merge(
              deskmanagerAuthorization.getTerritory());
        }
      }
    }
  }
  return null;
}

代码示例来源:origin: org.geomajas.plugin/geomajas-plugin-deskmanager

public ClientApplicationInfo createGeodeskConfiguration(Geodesk geodesk, boolean includeMaps) {
  try {
    geodesk = (Geodesk) session.getCurrentSession().merge(geodesk);
    UserApplicationInfo userApplicationInfo = getUserApplicationInfo(geodesk.getBlueprint()
        .getUserApplicationKey());

代码示例来源:origin: org.geomajas/geomajas-project-deskmanager

public ClientApplicationInfo createGeodeskConfiguration(Geodesk geodesk, boolean includeMaps) {
  try {
    geodesk = (Geodesk) session.getCurrentSession().merge(geodesk);
    UserApplicationInfo userApplicationInfo = getUserApplicationInfo(geodesk.getBlueprint()
        .getUserApplicationKey());

相关文章