public Instrument Retrieve(string name)
        {
            Key key = new Key(typeof(Instrument), true);
            key.Add("name", name);

            Instrument anInstrument = Broker.SessionBroker.TryRetrieveInstance(
                typeof(Instrument), key) as Instrument;

            if (anInstrument != null)
                return anInstrument;

            throw new InstrumentDoesNotExistException("No existe un instrumento con ese nombre");
        }
        public Event Retrieve(int id)
        {
            Key key = new Key(typeof(Event), true);
            key.Add("id", id);

            Event anEvent = Broker.SessionBroker.TryRetrieveInstance(
                typeof(Event), key) as Event;

            if (anEvent != null)
                return anEvent;

            throw new EventDoesNotExistException();
        }
        public Person RetrieveById(int id)
        {
            // I look for a person by his DNI
            Key key = new Key(typeof(Person), true);
            key.Add("id", id);

            Person aPerson = Broker.SessionBroker.TryRetrieveInstance(typeof(Person), key) as Person;

            // If found, it's returned
            if (aPerson != null)
                return aPerson;

            // the person who is looked for does not exist
            throw new PersonDoesNotExistException("No existe una persona con ese Id");
        }
        public Event Retrieve(DateTime date)
        {
            // Seconds are not important
            DateTime dateWithoutSeconds = new DateTime(date.Year, date.Month, date.Day,
                                                     date.Hour, date.Minute, 0);

            Key key = new Key(typeof(Event), true);
            key.Add("date", dateWithoutSeconds);

            Event anEvent = Broker.SessionBroker.TryRetrieveInstance(
                typeof(Event), key) as Event;

            if (anEvent != null)
                return anEvent;

            throw new EventDoesNotExistException();
        }
        private Attendance Retrieve(Person aPerson, Event anEvent)
        {
            Key key = new Key(true);
            key.Add("id_person", aPerson.Id);
            key.Add("id_event", anEvent.Id);

            Attendance anAttendance =
                Broker.SessionBroker.TryRetrieveInstance(typeof(Attendance), key) as Attendance;

            // If found, return it
            if (anAttendance != null)
                return anAttendance;

            return null;
        }