Package org.symphonyoss.s2.canon.runtime
Class EntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder>
- java.lang.Object
-
- org.symphonyoss.s2.canon.runtime.EntityFactory<E,S,B>
-
- Type Parameters:
E- The type of the entity produced by this factory, i.e. the facade.S- The super type of the entity, i.e. the generated super class.B- The builder type of the entity.
- All Implemented Interfaces:
IEntityFactory<E,S,B>
public abstract class EntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder> extends Object implements IEntityFactory<E,S,B>
A factory for an enclosing entity type.- Author:
- Bruce Skingle
-
-
Constructor Summary
Constructors Constructor Description EntityFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableList<E>newImmutableList(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)Return a list of new entity instances created from the given JSON array.com.google.common.collect.ImmutableSet<E>newImmutableSet(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)Return a set of new entity instances created from the given JSON array.EnewInstance(org.symphonyoss.s2.common.immutable.ImmutableByteArray bytes, IModelRegistry modelRegistry)List<E>newMutableList(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)Return a list of new entity instances created from the given JSON array.Set<E>newMutableSet(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)Return a set of new entity instances created from the given JSON array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.symphonyoss.s2.canon.runtime.IEntityFactory
getCanonType, newInstance, newInstance
-
-
-
-
Method Detail
-
newMutableList
public List<E> newMutableList(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)
Description copied from interface:IEntityFactoryReturn a list of new entity instances created from the given JSON array.- Specified by:
newMutableListin interfaceIEntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder>- Parameters:
jsonArray- An array of the JSON serialized form of the required entity.modelRegistry- A model registry to use to deserialize any nested objects.- Returns:
- A list of instances of the entity represented by the given serialized form.
-
newMutableSet
public Set<E> newMutableSet(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)
Description copied from interface:IEntityFactoryReturn a set of new entity instances created from the given JSON array.- Specified by:
newMutableSetin interfaceIEntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder>- Parameters:
jsonArray- An array of the JSON serialized form of the required entity.modelRegistry- A model registry to use to deserialize any nested objects.- Returns:
- A set of instances of the entity represented by the given serialized form.
-
newImmutableList
public com.google.common.collect.ImmutableList<E> newImmutableList(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)
Description copied from interface:IEntityFactoryReturn a list of new entity instances created from the given JSON array.- Specified by:
newImmutableListin interfaceIEntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder>- Parameters:
jsonArray- An array of the JSON serialized form of the required entity.modelRegistry- A model registry to use to deserialize any nested objects.- Returns:
- A list of instances of the entity represented by the given serialized form.
-
newImmutableSet
public com.google.common.collect.ImmutableSet<E> newImmutableSet(org.symphonyoss.s2.common.dom.json.JsonArray<?> jsonArray, IModelRegistry modelRegistry)
Description copied from interface:IEntityFactoryReturn a set of new entity instances created from the given JSON array.- Specified by:
newImmutableSetin interfaceIEntityFactory<E extends IEntity,S extends IEntity,B extends IEntityBuilder>- Parameters:
jsonArray- An array of the JSON serialized form of the required entity.modelRegistry- A model registry to use to deserialize any nested objects.- Returns:
- A set of instances of the entity represented by the given serialized form.
-
newInstance
public E newInstance(org.symphonyoss.s2.common.immutable.ImmutableByteArray bytes, IModelRegistry modelRegistry)
-
-