コード例 #1
0
  public ExportInfo getExportInfo(long exportTime) {
    ChromatticSession session = persister.getSession();

    ExportInfoMapping eim = session.findByPath(ExportInfoMapping.class, getPathFor(exportTime));

    try {
      if (eim != null) {
        return eim.toModel(null, null);
      } else {
        return null;
      }
    } finally {
      persister.closeSession(false);
    }
  }
コード例 #2
0
  public List<ExportInfo> getAvailableExportInfos() {
    ChromatticSession session = persister.getSession();

    ExportInfosMapping exportInfosMapping = getExportInfosMapping(session);

    List<ExportInfoMapping> exportInfoMappings = exportInfosMapping.getExportInfos();
    List<ExportInfo> exportInfos = new ArrayList<ExportInfo>(exportInfoMappings.size());
    for (ExportInfoMapping eim : exportInfoMappings) {
      exportInfos.add(eim.toModel(null, null));
    }

    persister.closeSession(false);

    exportInfosCount = exportInfos.size();

    return exportInfos;
  }