public abstract static class Entity.EntityBuilder<T extends EntityId,P extends Id,E extends Entity<T,P>,SELF extends Entity.EntityBuilder<T,P,E,SELF>> extends Object
Modifier | Constructor and Description |
---|---|
protected |
EntityBuilder(E template) |
protected |
EntityBuilder(T id,
Type type) |
Modifier and Type | Method and Description |
---|---|
E |
build()
Builds the entity.
|
protected abstract E |
build(Entity.EntityData<T,P> entityData) |
SELF |
creationTime(Date creationTime)
Sets the creation time.
|
SELF |
description(String description)
Sets the description.
|
SELF |
externalId(T externalId)
Sets the external id.
|
protected Entity.EntityData<T,P> |
getEntityData() |
protected abstract SELF |
getThis()
Returns the builder.
|
SELF |
globalId(GlobalId globalId)
Sets the global id.
|
SELF |
id(T id)
Sets the id.
|
SELF |
modificationCreatorId(UserId modificationCreatorId)
Sets the modification creator id.
|
SELF |
modificationUpdaterId(UserId modificationUpdaterId)
Sets the modification updater id.
|
SELF |
modificationVersion(long modificationVersion)
Sets the modification version.
|
SELF |
name(String name)
Sets the name.
|
SELF |
providerId(P providerId)
Sets the provider id.
|
SELF |
tenantId(TenantId tenantId)
Sets the tenant id.
|
SELF |
updateTime(Date updateTime)
Sets the update time.
|
protected EntityBuilder(E template)
protected final Entity.EntityData<T,P> getEntityData()
public SELF globalId(GlobalId globalId)
globalId
- the global id, must not be nullpublic SELF externalId(T externalId)
externalId
- the external id, must not be nullpublic SELF providerId(P providerId)
providerId
- the provider idpublic SELF tenantId(TenantId tenantId)
tenantId
- the tenant id, must not be nullpublic SELF description(String description)
description
- the descriptionpublic SELF creationTime(Date creationTime)
creationTime
- the creation timepublic SELF updateTime(Date updateTime)
updateTime
- the update timepublic SELF modificationVersion(long modificationVersion)
modificationVersion
- the modification versionpublic SELF modificationCreatorId(UserId modificationCreatorId)
modificationCreatorId
- the modification creator idpublic SELF modificationUpdaterId(UserId modificationUpdaterId)
modificationUpdaterId
- the modification updater idprotected abstract SELF getThis()
public final E build()
protected abstract E build(Entity.EntityData<T,P> entityData)
Copyright © 2010 - 2018 edorasware ag. All Rights Reserved.