package com.plexobject.aom;

import java.util.Collection;
import java.util.Collections;

public class Entity {

    private EntityType entityType;
    private Collection<Property> properties;

    public Entity(EntityType entityType) {
        this.entityType = entityType;
    }

    public EntityType getEntityType() {
        return entityType;
    }

    public void addProperty(Property property) {
        properties.add(property);
    }

    public Collection<Property> getProperties() {
        return Collections.unmodifiableCollection(properties);
    }

    public Object perform(String operationName, Object[] args) {
        return entityType.getOperation(operationName).perform(this, args);
    }
    //... other methods
}
