Package org.symphonyoss.s2.canon.runtime
Interface IBuilderFactory<S extends IEntity,B extends IEntityBuilder>
-
- Type Parameters:
S- The super type of the entity, i.e. the generated super class.B- The builder type of the entity.
public interface IBuilderFactory<S extends IEntity,B extends IEntityBuilder>A factory for an entity builder.- Author:
- Bruce Skingle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BnewInstance()Create a new builder with all fields initialized to default values.BnewInstance(S initial)Create a new builder with all fields initialized from the given builder.
-
-
-
Method Detail
-
newInstance
B newInstance()
Create a new builder with all fields initialized to default values.- Returns:
- A new builder.
-
newInstance
B newInstance(S initial)
Create a new builder with all fields initialized from the given builder. Values are copied so that subsequent changes to initial will not be reflected in the returned builder.- Parameters:
initial- A builder or instance whose values are copied into a new builder.- Returns:
- A new builder.
-
-