/* © SRSoftware 2025 */
package de.srsoftware.umbrella.stock;

import de.srsoftware.umbrella.core.api.Owner;
import de.srsoftware.umbrella.core.model.*;
import de.srsoftware.umbrella.core.model.Location;
import java.util.Collection;
import java.util.Map;

public interface StockDb {
	Property                addNewProperty(long itemId, String name, Object value, String unit);
	Location                delete(DbLocation location);
	Map<Long, Item>         find(Collection<Owner> owners, Collection<String> keys, boolean fulltext);
	Collection<DbLocation>  listChildLocations(long parentId);
	Collection<DbLocation>  listCompanyLocations(Company company);
	Collection<Item>        listItemsAt(Location location);
	Collection<Item>        listItemsOf(Company company);
	Collection<Property>    listProperties();
	Collection<DbLocation>  listUserLocations(UmbrellaUser userId);
	Item                 	loadItem(long id);
	Item 					loadItem(String owner, long itemNumber);
	DbLocation          	loadLocation(long locationId);
	Item					loadProperties(Item item);
	long					nextItemNumberFor(Owner owner);
	Map<String,Object>  	pathToLocation(Location location);
	DbLocation 				save(DbLocation location);
	Item     				save(Item item);

	Property   				setProperty(long itemId, long existingPropId, Object value);
}
