<commit_before>/*
 * openwms.org, the Open Warehouse Management System.
 *
 * This file is part of openwms.org.
 *
 * openwms.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * openwms.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software. If not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.openwms.core.integration;

import java.io.Serializable;
import java.util.List;

import org.openwms.core.domain.system.AbstractPreference;

/**
 * A PreferenceDao offers basic functionality to find and retrieve
 * {@link AbstractPreference} s.
 * 
 * @param <ID>
 *            The type of the entity class' unique id
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: $
 * @since 0.1
 */
public interface PreferenceDao<ID extends Serializable> {

    /**
     * Find and return the entity identified by the natural unique key.
     * 
     * @param id
     *            Natural key to find the entity (also known as business key)
     * @return The found entity
     */
    AbstractPreference findByKey(ID id);

    /**
     * Find all preferences of a particular type.
     * 
     * @param <T>
     *            Any subtype of {@link AbstractPreference}
     * @param clazz
     *            The type to search for
     * @return A list of entities
     */
    <T extends AbstractPreference> List<T> findByType(Class<T> clazz);

    /**
     * Find all entities and return them as a {@link java.util.List}.
     * 
     * @return List of all entities
     */
    List<AbstractPreference> findAll();
}<commit_msg>Added method to find preferences for owners<commit_after>/*
 * openwms.org, the Open Warehouse Management System.
 *
 * This file is part of openwms.org.
 *
 * openwms.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * openwms.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software. If not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.openwms.core.integration;

import java.io.Serializable;
import java.util.List;

import org.openwms.core.domain.system.AbstractPreference;

/**
 * A PreferenceDao offers basic functionality to find and retrieve
 * {@link AbstractPreference} s.
 * 
 * @param <ID>
 *            The type of the entity class' unique id
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Revision: $
 * @since 0.1
 */
public interface PreferenceDao<ID extends Serializable> {

    /**
     * Find and return the entity identified by the natural unique key.
     * 
     * @param id
     *            Natural key to find the entity (also known as business key)
     * @return The found entity
     */
    AbstractPreference findByKey(ID id);

    /**
     * Find all preferences of a particular type.
     * 
     * @param <T>
     *            Any subtype of {@link AbstractPreference}
     * @param clazz
     *            The type to search for
     * @return A list of entities
     */
    <T extends AbstractPreference> List<T> findByType(Class<T> clazz);

    /**
     * Find all preferences of a particular type and of an owner.
     * 
     * @param <T>
     *            Any subtype of {@link AbstractPreference}
     * @param clazz
     *            The type to search for
     * @param owner
     *            The owner of the preferences
     * @return A list of entities
     * @since 0.2
     */
    <T extends AbstractPreference> List<T> findByType(Class<T> clazz, String owner);

    /**
     * Find all entities and return them as a {@link java.util.List}.
     * 
     * @return List of all entities
     */
    List<AbstractPreference> findAll();
}
{'fraction_non_alphanumeric': 0.08744205646860514, 'fraction_numerical': 0.006321112515802781, 'mean_word_length': 2.7260596546310834, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7327744', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1301, 'n_words': 563}