001    package de.deepamehta.core.service;
002    
003    import de.deepamehta.core.Association;
004    import de.deepamehta.core.Topic;
005    import de.deepamehta.core.Type;
006    import de.deepamehta.core.model.AssociationDefinitionModel;
007    
008    
009    
010    // ### TODO: should move to "storage" package?
011    public interface TypeStorage {
012    
013        AssociationDefinitionModel fetchAssociationDefinition(Association assoc);
014    
015        // ---
016    
017        Topic fetchParentType(Association assoc);
018    
019        Topic fetchChildType(Association assoc);
020    
021        // --
022    
023        // Removes an association from memory and rebuilds the sequence in DB. Note: the underlying
024        // association is *not* removed from DB.
025        // This method is called (by the Type Editor plugin's preDeleteAssociation() hook) when the
026        // deletion of an association that represents an association definition is imminent.
027        void removeAssociationDefinitionFromMemoryAndRebuildSequence(Type type, String childTypeUri);
028    }