pl.edu.icm.unity.engine.bulk.EntitiesData Maven / Gradle / Ivy
/*
* Copyright (c) 2018 Bixbit - Krzysztof Benedyczak. All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package pl.edu.icm.unity.engine.bulk;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import pl.edu.icm.unity.base.attribute.AttributeExt;
import pl.edu.icm.unity.base.entity.EntityInformation;
import pl.edu.icm.unity.base.identity.Identity;
/**
* Information about many entities. May include all system entities, or only a subset, depending on usage context.
*/
class EntitiesData
{
private Map entityInfo;
private Map> identities;
private Map>> directAttributes;
private Map> memberships;
private EntitiesData()
{
}
static Builder builder()
{
return new Builder();
}
Map getEntityInfo()
{
return entityInfo;
}
Map> getIdentities()
{
return identities;
}
Map>> getDirectAttributes()
{
return directAttributes;
}
Map> getMemberships()
{
return memberships;
}
static class Builder
{
EntitiesData obj = new EntitiesData();
private Builder()
{
}
Builder withEntityInfo(Map entityInfo)
{
obj.entityInfo = Collections.unmodifiableMap(entityInfo);
return this;
}
Builder withIdentities(Map> identities)
{
obj.identities = Collections.unmodifiableMap(identities);
return this;
}
Builder withDirectAttributes(Map>> directAttributes)
{
obj.directAttributes = Collections.unmodifiableMap(directAttributes);
return this;
}
Builder withMemberships(Map> memberships)
{
obj.memberships = Collections.unmodifiableMap(memberships);
return this;
}
EntitiesData build()
{
EntitiesData ret = obj;
obj = new EntitiesData();
return ret;
}
}
}