@@ -0,0 +1,2055 @@
+/*%0A * Copyright (c) 2013-2014 Red Rainbow IT Solutions GmbH, Germany%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of%0A * this software and associated documentation files (the %22Software%22), to deal in%0A * the Software without restriction, including without limitation the rights to%0A * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of%0A * the Software, and to permit persons to whom the Software is furnished to do so,%0A * subject to the following conditions:%0A * %0A * The above copyright notice and this permission notice shall be included in all%0A * copies or substantial portions of the Software.%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS%0A * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR%0A * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER%0A * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN%0A * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0Apackage org.jeecqrs.common.domain.model;%0A%0Aimport org.jeecqrs.common.Identity;%0A%0A/**%0A * Provides the ability to load and store objects.%0A * %0A * @param %3CT%3E  the type of the objects%0A * @param %3CK%3E  the type to identify the objects%0A */%0Apublic interface Repository%3CT, K%3E %7B%0A%0A    /**%0A     * Retrieves the object with the given identity.%0A     * Must exist.%0A     * %0A     * @param id  the id of the object to retrieve%0A     * @return    the object with the given id%0A     */%0A    T ofIdentity(K id);%0A%0A    /**%0A     * Adds an object to the repository.%0A     *%0A     * @param object  the object to add%0A     * @param commitId  unique id for this commit%0A     */%0A    void add(T object, Identity commitId);%0A%0A    /**%0A     * Saves an instance of the object to the repository.%0A     * %0A     * @param object the object to save%0A     * @param commitId  unique id for this commit%0A     */%0A    void save(T object, Identity commitId);%0A    %0A%7D%0A%0A

Add repository interface