001package de.deepamehta.core.impl;
002
003import de.deepamehta.core.AssociationType;
004import de.deepamehta.core.model.AssociationTypeModel;
005
006
007
008/**
009 * An association type that is attached to the {@link CoreService}.
010 */
011class AssociationTypeImpl extends DeepaMehtaTypeImpl implements AssociationType {
012
013    // ---------------------------------------------------------------------------------------------------- Constructors
014
015    AssociationTypeImpl(AssociationTypeModelImpl model, PersistenceLayer pl) {
016        super(model, pl);
017    }
018
019    // -------------------------------------------------------------------------------------------------- Public Methods
020
021
022
023    // **************************************
024    // *** AssociationType Implementation ***
025    // **************************************
026
027
028
029    @Override
030    public AssociationTypeModelImpl getModel() {
031        return (AssociationTypeModelImpl) model;
032    }
033
034    @Override
035    public void update(AssociationTypeModel updateModel) {
036        model.update((AssociationTypeModelImpl) updateModel);     // ### FIXME: call through pl for access control
037    }
038
039
040
041    // ----------------------------------------------------------------------------------------- Package Private Methods
042
043    @Override
044    AssociationTypeModelImpl _getModel() {
045        return pl._getAssociationType(getUri());
046    }
047}