Changeset 7856


Ignore:
Timestamp:
Oct 20, 2020, 8:09:37 AM (14 months ago)
Author:
Nicklas Nordborg
Message:

References #2224: Files should be annotatable

Core- and data-layer classes have been updated so that file support annotations. Database schema version updated to 149.

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

Legend:

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

    r7714 r7856  
    8585*/
    8686public class File
    87   extends CommonItem
     87  extends AnnotatedItem
    8888  implements Transactional, DiskConsumable, Subtypable
    8989{
     
    507507  // -------------------------------------------
    508508  /*
     509    From the Annotatable interface
     510    -------------------------------------------
     511  */
     512  @Override
     513  public Set<Annotatable> getAnnotatableParents()
     514  {
     515    return null;
     516  }
     517  // -------------------------------------------
     518 
     519  /*
    509520    From BasicItem
    510521    -------------------------------------------
     
    546557    return used || super.isUsed();
    547558  }
     559
    548560  /**
    549561    Get all:
  • trunk/src/core/net/sf/basedb/core/Install.java

    r7816 r7856  
    118118    method.
    119119  */
    120   public static final int NEW_SCHEMA_VERSION = Integer.valueOf(148).intValue();
     120  public static final int NEW_SCHEMA_VERSION = Integer.valueOf(149).intValue();
    121121 
    122122  public static synchronized int createTables(SchemaGenerator.Mode mode, ProgressReporter progress,
  • trunk/src/core/net/sf/basedb/core/Update.java

    r7816 r7856  
    441441    </td>
    442442  </tr>
     443  <tr>
     444    <td>149</td>
     445    <td>
     446      Made {@link File} annotatable. No special database update is needed.
     447      Only increase the schema version.
     448    </td>
     449  </tr>
    443450  </table>
    444451
     
    719726      }
    720727     
    721       if (schemaVersion < 148)
    722       {
    723         if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 148...");
    724         schemaVersion = setSchemaVersionInTransaction(session, 148);
    725         progress_current += progress_step;
     728      if (schemaVersion < 149)
     729      {
     730        if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 149...");
     731        schemaVersion = setSchemaVersionInTransaction(session, 149);
     732        progress_current += 2 * progress_step;
    726733      }
    727734   
  • trunk/src/core/net/sf/basedb/core/data/FileData.java

    r7573 r7856  
    3737*/
    3838public class FileData
    39   extends CommonData
     39  extends AnnotatedData
    4040  implements DiskConsumableData, LoggableData, SubtypableData
    4141{
Note: See TracChangeset for help on using the changeset viewer.