public static TariffPricePairDAO sharedInstance() {
   if (sharedInstance == null) {
     sharedInstance =
         new TariffPricePairDAO(
             GlobalJDOManagerProvider.sharedInstance().getCache(),
             GlobalJFireEjb3Provider.sharedInstance());
   }
   return sharedInstance;
 }
Exemple #2
0
 /**
  * Extracts all {@link ReportRegistryItemID} of the given {@link ReportRegistryItem}s given that
  * they are a {@link ReportLayout} and no {@link ReportCategory}.
  *
  * @param reportRegistryItems The {@link ReportRegistryItem}s to filter.
  * @return A collection with only {@link ReportRegistryItem}s of {@link ReportLayout}s.
  */
 protected Collection<ReportRegistryItemID> extractReportLayouts(
     Collection<ReportRegistryItem> reportRegistryItems) {
   Collection<ReportRegistryItemID> itemIDs = new ArrayList<ReportRegistryItemID>();
   for (ReportRegistryItem item : reportRegistryItems) {
     ReportRegistryItemID id = (ReportRegistryItemID) JDOHelper.getObjectId(item);
     if (ReportLayout.class.isAssignableFrom(
         GlobalJDOManagerProvider.sharedInstance()
             .getObjectID2PCClassMap()
             .getPersistenceCapableClass(id))) {
       itemIDs.add(id);
     }
   }
   return itemIDs;
 }