Changeset 7597


Ignore:
Timestamp:
Feb 22, 2019, 9:06:54 AM (5 years ago)
Author:
Nicklas Nordborg
Message:

References #2135: Remove support for secondary storage

Removed QuotaType.hasSecondaryLocation() property.

Location:
trunk/src/core/net/sf/basedb/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/Install.java

    r7573 r7597  
    188188      progressStep++;
    189189      if (progress != null) progress.display((int)(progressStep*progress_factor), "--Creating quota types...");
    190       createQuotaType(QuotaType.TOTAL, "Total", "Total quota", true);
    191       createQuotaType(QuotaType.FILE, "Files", "Quota for files", true);
    192       createQuotaType(QuotaType.RAW_DATA, "Raw data", "Quota for raw data", false);
    193       createQuotaType(QuotaType.EXPERIMENT, "Experiment", "Quota for experiment", false);
     190      createQuotaType(QuotaType.TOTAL, "Total", "Total quota");
     191      createQuotaType(QuotaType.FILE, "Files", "Quota for files");
     192      createQuotaType(QuotaType.RAW_DATA, "Raw data", "Quota for raw data");
     193      createQuotaType(QuotaType.EXPERIMENT, "Experiment", "Quota for experiment");
    194194 
    195195      // Quota
     
    11501150    Create a {@link QuotaType}.
    11511151  */
    1152   @SuppressWarnings("deprecation")
    1153   private static QuotaTypeData createQuotaType(String systemId, String name, String description, boolean secondaryLocation)
     1152  private static QuotaTypeData createQuotaType(String systemId, String name, String description)
    11541153    throws BaseException
    11551154  {
     
    11841183        quotaType.setName(name);
    11851184        quotaType.setDescription(description);
    1186         quotaType.setSecondaryLocation(secondaryLocation);
    11871185        HibernateUtil.saveData(session, quotaType);
    11881186        HibernateUtil.commit(tx);
  • trunk/src/core/net/sf/basedb/core/QuotaType.java

    r7548 r7597  
    219219  // -------------------------------------------
    220220
    221   /**
    222     Check if items using quota from this quota type can be stored
    223     in the secondary location or not.
    224     @return <code>true</code> if the secondary location can be used, <code>false</code> otherwise
    225     @deprecated In 3.14, no replacement
    226   */
    227   @Deprecated
    228   public boolean hasSecondaryLocation()
    229   {
    230     return getData().getSecondaryLocation();
    231   }
    232221}
  • trunk/src/core/net/sf/basedb/core/Update.java

    r7595 r7597  
    673673      }
    674674     
    675       if (schemaVersion < 143)
     675      if (schemaVersion < 144)
    676676      {
    677677        // Note! 143 and 144 is a two-step update due to DROP COLUMN
     
    20802080    column and all stored contexts using the 'action' column.
    20812081    Update the QuotaValues table by removing all entries with
    2082     location=2
     2082    location=2. Remove the 'secondary_location' column from the
     2083    QuotaTypes table.
    20832084    @return The new schema version (=144)
    20842085  */
     
    21232124      }
    21242125     
    2125       // Drop the 'Files.action' column
     2126      // Drop the 'Files.action' and 'QuotaTypes.secondary_location' columns
    21262127      dropColumn(session, "Files", "action", null);
    2127        
     2128      dropColumn(session, "QuotaTypes", "secondary_location", null);
     2129     
    21282130      // Update the schema version number
    21292131      setSchemaVersionInTransaction(session, schemaVersion);
  • trunk/src/core/net/sf/basedb/core/data/QuotaTypeData.java

    r7548 r7597  
    102102  // -------------------------------------------
    103103
    104   private boolean secondaryLocation;
    105   /**
    106     If this quota type can use disk quota in the secondary location or not.
    107    
    108     @hibernate.property column="`secondary_location`" type="boolean" not-null="true" update="false"
    109     @deprecated In 3.14, no replacement
    110   */
    111   @Deprecated
    112   public boolean getSecondaryLocation()
    113   {
    114     return secondaryLocation;
    115   }
    116   @Deprecated
    117   public void setSecondaryLocation(boolean secondaryLocation)
    118   {
    119     this.secondaryLocation = secondaryLocation;
    120   }
    121  
    122104}
Note: See TracChangeset for help on using the changeset viewer.